Method and apparatus for measuring location of multiple electronic devices based on time scheduling information in connection with ultra-wide band communication

ABSTRACT

An apparatus includes at least one communication module; a memory; and a processor operably connected to the at least one communication module and the memory. The processor is configured to identify multiple external electronic devices by using the at least one communication module; determine time schedule information based on a number of the multiple identified external electronic devices or based on a location measurement scheme; transmit the time schedule information to the multiple external electronic devices by using the at least one communication module; transmit first information to the multiple external electronic devices at a first time assigned to the electronic device, based on the time schedule information, by using the at least one communication module; receive second information from one of the multiple external electronic devices at a second time assigned to the multiple external electronic devices; and determine a distance from one of the multiple external electronic devices based on the first information or the second information.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is based on and claims priority under 35 U.S.C. § 119to Korean Patent Application No. 10-2019-0066890, filed on Jun. 5, 2019,in the Korean Intellectual Property Office, the disclosure of which isincorporated by reference herein in its entirety.

BACKGROUND 1. Field

The disclosure relates generally to a method for measuring the locationof multiple electronic devices, based on time scheduling information, inconnection with ultra-wide band (UWB) communication.

2. Description of Related Art

Development of digital technology has been followed by widespread use ofvarious types of electronic devices, such as mobile communicationterminals, personal digital assistants (PDA), electronic wallets,smartphones, tablet personal computers (PC), or wearable devices. Inorder to support and enhance the functionality of such electronicdevices, the hardware part and/or software part of the electronicdevices are continuously being improved.

Meanwhile, during a location (or distance) measurement operation throughUWB communication, locations of respective electronic devices aremeasured according to a two way ranging (TWR) scheme between twoelectronic devices. The TWR scheme may include a single side (SS)-TWRscheme or a double side (DS)-TWR scheme. According to the SS-TWR scheme,if an electronic device transmits a ranging poll message (or rangingpoll data) to an external electronic device (or counterpart electronicdevice), the external electronic device transmits a ranging responsemessage to the electronic device, and the electronic device therebyidentifies the distance from the external electronic device (or locationof the external electronic device). According to the DS-TWR scheme, ifthe external electronic device transmits a ranging poll message, theelectronic device transmits a ranging response message to the externalelectronic device, and the external electronic device transmits aranging final message to the electronic device, thereby enabling theelectronic device to identify the distance from the external electronicdevice.

Conventional location measurement technologies are solely focused on howthe distance is measured between two electronic devices, and do notconsider how to efficiently measure the location (or distance) ofmultiple electronic devices. When measuring distances by using aconventional technology, it may take a long time for an electronicdevice to measure the distance (or location) from multiple electronicdevices, and it may be necessary to exchange data multiple times. Forexample, when measuring the location of multiple electronic devicesaccording to the DS-TWR scheme, each of N electronic devices may need toexchange data a total of 3*N*(N−1)/2 times, in order to measure thelocation of the remaining (N−1) electronic devices other than itself.For example, each of four electronic devices may need to exchange data atotal of eighteen times, in order to measure the location of theremaining three electronic devices other than itself. There has recentlybeen an increasing number of fields requiring low latency (for example,augmented reality (AR) gaming and scanning electronic devices on ARscreens), thereby necessitating a method wherein multiple electronicdevices can efficiently measure the distance between each other quickly.

SUMMARY

According to an aspect of the present disclosure, an electronic deviceincludes at least one communication module; a memory; and a processor.The processor may be configured to identify multiple external electronicdevices by using the at least one communication module; determine timeschedule information based on the number of the multiple identifiedexternal electronic devices or based on a location measurement scheme;transmit the time schedule information to the multiple externalelectronic devices by using the at least one communication module;transmit first information to the multiple external electronic devicesat a first time assigned to the electronic device, based on the timeschedule information, by using the at least one communication module;receive second information from one of the multiple external electronicdevices at a second time assigned to the multiple external electronicdevices, by using the at least one communication module; and determine adistance from one of the multiple external electronic devices based onthe first information or the second information.

According to another aspect of the present disclosure, an electronicdevice includes at least one communication module; a memory; and aprocessor. The processor may be configured to respond to a locationmeasurement request from a first external electronic device by using theat least one communication module; receive time schedule informationfrom the first external electronic device by using the at least onecommunication module; receive first information from the first externalelectronic device at a first time assigned to the first externalelectronic device, based on the time schedule information, by using theat least one communication module; transmit second information to thefirst external electronic device and to a second external electronicdevice at a second time assigned to the electronic device by using theat least one communication module; receive third information from thesecond external electronic device at a third time by using the at leastone communication module; and determine a distance from the secondexternal electronic device based on the second information or the thirdinformation.

According to another aspect of the present disclosure, a method foroperating an electronic device includes the operations of identifyingmultiple external electronic devices by using at least one communicationmodule included in the electronic device; determining time scheduleinformation based on a number of the multiple identified externalelectronic devices or based on a location measurement scheme;transmitting the time schedule information to the multiple externalelectronic devices; transmitting first information to the multipleexternal electronic devices at a first time assigned to the electronicdevice, based on the time schedule information, by using the at leastone communication module; receiving second information from a first oneof the multiple external electronic devices at a second time assigned tothe multiple external electronic devices, by using the at least onecommunication module; and determining a distance from the first one ofthe multiple external electronic devices based on the first informationor the second information.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects, features, and advantages of certainembodiments of the present disclosure will be more apparent from thefollowing description taken in conjunction with the accompanyingdrawings, in which:

FIG. 1 is a block diagram of an electronic device inside a networkenvironment, according to an embodiment;

FIG. 2 is a hardware block diagram of an electronic device, according toan embodiment;

FIG. 3 is a block diagram of a program module of an electronic devicesupporting a UWB function, according to an embodiment;

FIG. 4A is a flowchart illustrating a method for measuring the locationof multiple electronic devices based on an SS-TWR scheme, according toan embodiment;

FIG. 4B is a flowchart illustrating a method for measuring the locationof multiple electronic devices based on an SS-TWR scheme, according toan embodiment;

FIG. 4C is a diagram illustrating packets transmitted based on theSS-TWR scheme, according to an embodiment;

FIG. 4D is a diagram illustrating packets transmitted based on theSS-TWR scheme, according to an embodiment;

FIG. 5 is a flowchart illustrating a method for operating a masterelectronic device based on the SS-TWR scheme, according to anembodiment;

FIG. 6 is a flowchart illustrating a method for operating a slaveelectronic device based on the SS-TWR scheme, according to anembodiment;

FIG. 7A is a flowchart illustrating a method for measuring the locationof multiple electronic devices based on a DS-TWR scheme, according to anembodiment;

FIG. 7B is a flowchart illustrating a method for measuring the locationmultiple electronic devices based on the DS-TWR scheme, according to anembodiment;

FIG. 7C illustrates exemplary information transmitted based on theDS-TWR scheme, according to an embodiment;

FIG. 7D illustrates exemplary information transmitted based on theDS-TWR scheme, according to an embodiment;

FIG. 7E illustrates exemplary information transmitted based on theDS-TWR scheme, according to an embodiment;

FIG. 8 is a flowchart illustrating a method for operating a masterelectronic device based on the DS-TWR scheme, according to anembodiment;

FIG. 9 is a flowchart illustrating a method for operating a slaveelectronic device based on the DS-TWR scheme, according to anembodiment; and

FIG. 10 is a flowchart illustrating a method for operating an electronicdevice based on the location of multiple electronic devices, accordingto an embodiment.

DETAILED DESCRIPTION

Various embodiments disclose a method and apparatus, wherein, whenmeasuring the location of multiple electronic devices through UWBcommunication, each electronic device can schedule a time to transmitinformation for location measurement and can transmit the information atthe scheduled time, thereby acquiring the location of multipleelectronic devices within a short period of time.

The electronic device according to various embodiments may be one ofvarious types of electronic devices. The electronic devices may include,for example, a portable communication device (e.g., a smart phone), acomputer device, a portable multimedia device, a portable medicaldevice, a camera, a wearable device, or a home appliance. According toan embodiment of the disclosure, the electronic devices are not limitedto those described above.

It should be appreciated that various embodiments of the presentdisclosure and the terms used therein are not intended to limit thetechnological features set forth herein to particular embodiments andinclude various changes, equivalents, or replacements for acorresponding embodiment. With regard to the description of thedrawings, similar reference numerals may be used to refer to similar orrelated elements. It is to be understood that a singular form of a nouncorresponding to an item may include one or more of the things, unlessthe relevant context clearly indicates otherwise. As used herein, eachof such phrases as “A or B,” “at least one of A and B,” “at least one ofA or B,” “B, or C,” “at least one of A, B, and C,” and “at least one ofA, B, or C,” may include all possible combinations of the itemsenumerated together in a corresponding one of the phrases. As usedherein, such terms as “1st” and “2nd,” or “first” and “second” may beused to simply distinguish a corresponding component from another, anddoes not limit the components in other aspect (e.g., importance ororder). It is to be understood that if an element (e.g., a firstelement) is referred to, with or without the term “operatively” or“communicatively”, as “coupled with,” “coupled to,” “connected with,” or“connected to” another element (e.g., a second element), it means thatthe element may be coupled with the other element directly (e.g.,wiredly), wirelessly, or via a third element.

As used herein, the term “module” may include a unit implemented inhardware, software, or firmware, and may interchangeably be used withother terms, for example, “logic,” “logic block,” “part,” or“circuitry”. A module may be a single integral component, or a minimumunit or part thereof, adapted to perform one or more functions. Forexample, according to an embodiment, the module may be implemented in aform of an application-specific integrated circuit (ASIC).

FIG. 1 is a block diagram illustrating an electronic device 101 in anetwork environment 100 according to various embodiments. Referring toFIG. 1, the electronic device 101 in the network environment 100 maycommunicate with an electronic device 102 via a first network 198 (e.g.,a short-range wireless communication network), or an electronic device104 or a server 108 via a second network 199 (e.g., a long-rangewireless communication network). According to an embodiment, theelectronic device 101 may communicate with the electronic device 104 viathe server 108. According to an embodiment, the electronic device 101may include a processor 120, memory 130, an input device 150, a soundoutput device 155, a display device 160, an audio module 170, a sensormodule 176, an interface 177, a haptic module 179, a camera module 180,a power management module 188, a battery 189, a communication module190, a subscriber identification module (SIM) 196, or an antenna module197. In some embodiments, at least one (e.g., the display device 160 orthe camera module 180) of the components may be omitted from theelectronic device 101, or one or more other components may be added inthe electronic device 101. In some embodiments, some of the componentsmay be implemented as single integrated circuitry. For example, thesensor module 176 (e.g., a fingerprint sensor, an iris sensor, or anilluminance sensor) may be implemented as embedded in the display device160 (e.g., a display).

The processor 120 may execute, for example, software (e.g., a program140) to control at least one other component (e.g., a hardware orsoftware component) of the electronic device 101 coupled with theprocessor 120, and may perform various data processing or computation.According to an embodiment, as at least part of the data processing orcomputation, the processor 120 may load a command or data received fromanother component (e.g., the sensor module 176 or the communicationmodule 190) in volatile memory 132, process the command or the datastored in the volatile memory 132, and store resulting data innon-volatile memory 134. According to an embodiment, the processor 120may include a main processor 121 (e.g., a central processing unit (CPU)or an application processor (AP)), and an auxiliary processor 123 (e.g.,a graphics processing unit (GPU), an image signal processor (ISP), asensor hub processor, or a communication processor (CP)) that isoperable independently from, or in conjunction with, the main processor121. Additionally or alternatively, the auxiliary processor 123 may beadapted to consume less power than the main processor 121, or to bespecific to a specified function. The auxiliary processor 123 may beimplemented as separate from, or as part of the main processor 121.

The auxiliary processor 123 may control at least some of functions orstates related to at least one component (e.g., the display device 160,the sensor module 176, or the communication module 190) among thecomponents of the electronic device 101, instead of the main processor121 while the main processor 121 is in an inactive (e.g., sleep) state,or together with the main processor 121 while the main processor 121 isin an active state (e.g., executing an application). According to anembodiment, the auxiliary processor 123 (e.g., an ISP or a CP) may beimplemented as part of another component (e.g., the camera module 180 orthe communication module 190) functionally related to the auxiliaryprocessor 123.

The memory 130 may store various data used by at least one component(e.g., the processor 120 or the sensor module 176) of the electronicdevice 101. The various data may include, for example, software (e.g.,the program 140) and input data or output data for a command relatedthereto. The memory 130 may include the volatile memory 132 or thenon-volatile memory 134.

The program 140 may be stored in the memory 130 as software, and mayinclude, for example, an operating system (OS) 142, middleware 144, oran application 146.

The input device 150 may receive a command or data to be used by othercomponent (e.g., the processor 120) of the electronic device 101, fromthe outside (e.g., a user) of the electronic device 101. The inputdevice 150 may include, for example, a microphone, a mouse, or akeyboard.

The sound output device 155 may output sound signals to the outside ofthe electronic device 101. The sound output device 155 may include, forexample, a speaker or a receiver. The speaker may be used for generalpurposes, such as playing multimedia or playing record, and the receivermay be used for an incoming calls. According to an embodiment, thereceiver may be implemented as separate from, or as part of the speaker.

The display device 160 may visually provide information to the outside(e.g., a user) of the electronic device 101. The display device 160 mayinclude, for example, a display, a hologram device, or a projector andcontrol circuitry to control a corresponding one of the display,hologram device, and projector. According to an embodiment, the displaydevice 160 may include touch circuitry adapted to detect a touch, orsensor circuitry (e.g., a pressure sensor) adapted to measure theintensity of force incurred by the touch.

The audio module 170 may convert a sound into an electrical signal andvice versa. According to an embodiment, the audio module 170 may obtainthe sound via the input device 150, or output the sound via the soundoutput device 155 or a headphone of an external electronic device (e.g.,an electronic device 102) directly (e.g., wiredly) or wirelessly coupledwith the electronic device 101.

The sensor module 176 may detect an operational state (e.g., power ortemperature) of the electronic device 101 or an environmental state(e.g., a state of a user) external to the electronic device 101, andthen generate an electrical signal or data value corresponding to thedetected state. According to an embodiment, the sensor module 176 mayinclude, for example, a gesture sensor, a gyro sensor, an atmosphericpressure sensor, a magnetic sensor, an acceleration sensor, a gripsensor, a proximity sensor, a color sensor, an infrared (IR) sensor, abiometric sensor, a temperature sensor, a humidity sensor, or anilluminance sensor.

The interface 177 may support one or more specified protocols to be usedfor the electronic device 101 to be coupled with the external electronicdevice (e.g., the electronic device 102) directly (e.g., wiredly) orwirelessly. According to an embodiment, the interface 177 may include,for example, a high definition multimedia interface (HDMI), a universalserial bus (USB) interface, a secure digital (SD) card interface, or anaudio interface.

A connecting terminal 178 may include a connector via which theelectronic device 101 may be physically connected with the externalelectronic device (e.g., the electronic device 102). According to anembodiment, the connecting terminal 178 may include, for example, a HDMIconnector, a USB connector, a SI) card connector, or an audio connector(e.g., a headphone connector).

The haptic module 179 may convert an electrical signal into a mechanicalstimulus (e.g., a vibration or a movement) or electrical stimulus whichmay be recognized by a user via his tactile sensation or kinestheticsensation. According to an embodiment, the haptic module 179 mayinclude, for example, a motor, a piezoelectric element, or an electricstimulator.

The camera module 180 may capture a still image or moving images.According to an embodiment, the camera module 180 may include one ormore lenses, image sensors, ISPs, or flashes.

The power management module 188 may manage power supplied to theelectronic device 101. According to one embodiment, the power managementmodule 188 may be implemented as at least part of, for example, a powermanagement integrated circuit (PMIC).

The battery 189 may supply power to at least one component of theelectronic device 101. According to an embodiment, the battery 189 mayinclude, for example, a primary cell which is not rechargeable, asecondary cell which is rechargeable, or a fuel cell.

The communication module 190 may support establishing a direct (e.g.,wired) communication channel or a wireless communication channel betweenthe electronic device 101 and the external electronic device (e.g., theelectronic device 102, the electronic device 104, or the server 108) andperforming communication via the established communication channel. Thecommunication module 190 may include one or more CPs that are operableindependently from the processor 120 (e.g., the AP) and supports adirect (e.g., wired) communication or a wireless communication.According to an embodiment, the communication module 190 may include awireless communication module 192 (e.g., a cellular communicationmodule, a short-range wireless communication module, or a globalnavigation satellite system (GNSS) communication module) or a wiredcommunication module 194 (e.g., a local area network (LAN) communicationmodule or a power line communication (PLC) module). A corresponding oneof these communication modules may communicate with the externalelectronic device via the first network 198 (e.g., a short-rangecommunication network, such as Bluetooth™, wireless-fidelity (Wi-Fi)direct, or infrared data association (IrDA)) or the second network 199(e.g., a long-range communication network, such as a cellular network,the Internet, or a computer network (e.g., LAN or wide area network(WAN)). These various types of communication modules may be implementedas a single component (e.g., a single chip), or may be implemented asmulti components (e.g., multi chips) separate from each other. Thewireless communication module 192 may identify and authenticate theelectronic device 101 in a communication network, such as the firstnetwork 198 or the second network 199, using subscriber information(e.g., international mobile subscriber identity (IMSI)) stored in thesubscriber identification module 196.

The antenna module 197 may transmit or receive a signal or power to orfrom the outside (e.g., the external electronic device) of theelectronic device 101. According to an embodiment, the antenna module197 may include one or more antennas, and, therefrom, at least oneantenna appropriate for a communication scheme used in the communicationnetwork, such as the first network 198 or the second network 199, may beselected, for example, by the communication module 190 (e.g., thewireless communication module 192). The signal or the power may then betransmitted or received between the communication module 190 and theexternal electronic device via the selected at least one antenna.

At least some of the above-described components may be coupled mutuallyand communicate signals (e.g., commands or data) therebetween via aninter-peripheral communication scheme (e.g., a bus, general purposeinput and output (GPIO), serial peripheral interface (SPI), or mobileindustry processor interface (MIPI).

According to an embodiment, commands or data may be transmitted orreceived between the electronic device 101 and the external electronicdevice 104 via the server 108 coupled with the second network 199. Eachof the electronic devices 102 and 104 may be a device of a same type as,or a different type, from the electronic device 101. According to anembodiment, all or some of operations to be executed at the electronicdevice 101 may be executed at one or more of the external electronicdevices 102, 104, or 108. For example, if the electronic device 101should perform a function or a service automatically, or in response toa request from a user or another device, the electronic device 101,instead of, or in addition to, executing the function or the service,may request the one or more external electronic devices to perform atleast part of the function or the service. The one or more externalelectronic devices receiving the request may perform the at least partof the function or the service requested, or an additional function oran additional service related to the request, and transfer an outcome ofthe performing to the electronic device 101. The electronic device 101may provide the outcome, with or without further processing of theoutcome, as at least part of a reply to the request. To that end, acloud computing, distributed computing, or client-server computingtechnology may be used, for example.

Various embodiments as set forth herein may be implemented as software(e.g., the program 140) including one or more instructions that arestored in a storage medium (e.g., internal memory 136 or external memory138) that is readable by a machine (e.g., the electronic device 101).For example, a processor (e.g., the processor 120) of the machine (e.g.,the electronic device 101) may invoke at least one of the one or moreinstructions stored in the storage medium, and execute it, with orwithout using one or more other components under the control of theprocessor. This allows the machine to be operated to perform at leastone function according to the at least one instruction invoked. The oneor more instructions may include a code generated by a complier or acode executable by an interpreter. The machine-readable storage mediummay be provided in the form of a non-transitory storage medium. Wherein,the term “non-transitory” simply means that the storage medium is atangible device, and does not include a signal (e.g., an electromagneticwave), but this term does not differentiate between where data issemi-permanently stored in the storage medium and where the data istemporarily stored in the storage medium.

A method according to various embodiments of the disclosure may beincluded and provided in a computer program product. The computerprogram product may be traded as a product between a seller and a buyer.The computer program product may be distributed in the form of amachine-readable storage medium (e.g., compact disc read only memory(CD-ROM)), or be distributed (e.g., downloaded or uploaded) online viaan application store (e.g., Play Store™), or between two user devices(e.g., smart phones) directly. If distributed online, at least part ofthe computer program product may be temporarily generated or at leasttemporarily stored in the machine-readable storage medium, such asmemory of the manufacturer's server, a server of the application store,or a relay server.

According to various embodiments, each component (e.g., a module or aprogram) of the above-described components may include a single entityor multiple entities. According to various embodiments, one or more ofthe above-described components may be omitted, or one or more othercomponents may be added. Alternatively or additionally, a plurality ofcomponents (e.g., modules or programs) may be integrated into a singlecomponent. In such a case, according to various embodiments, theintegrated component may still perform one or more functions of each ofthe plurality of components in the same or similar manner as they areperformed by a corresponding one of the plurality of components beforethe integration. According to various embodiments, operations performedby the module, the program, or another component may be carried outsequentially, in parallel, repeatedly, or heuristically, or one or moreof the operations may be executed in a different order or omitted, orone or more other operations may be added.

FIG. 2 is a hardware block diagram of an electronic device, according toan embodiment.

Referring to FIG. 2, the electronic device includes a processor 120, alow-power Bluetooth module 210, a Bluetooth low energy (BLE) antenna211, a UWB module 220, a first UWB antenna 221, a second UWB antenna223, and an embedded secure element (eSE) module 230. At least one ofthe elements of the electronic device 101 illustrated in FIG. 2 (forexample, the second UWB antenna 223) may be omitted, or at least onedifferent element may be added thereto. The low-power Bluetooth module210 or the UWB module 220 may be included in the communication module190 in FIG. 1. The low-power Bluetooth module 210 may transmit/receive alow-power Bluetooth signal under the control of the processor 120. Thelow-power Bluetooth module 210 may transmit/receive the low-powerBluetooth signal through the BLE antenna 211.

The UWB module 220 may include a transmitter (TX) module fortransmitting a UWB signal (for example, a poll, a response, or a finalsignal) for location measurement to an external electronic device, and areceiver (RX) module for receiving a UWB signal. The UWB signal may betransmitted/received through the first UWB antenna 221 or the second UWBantenna 223. The UWB module 220 may operate under the control of theprocessor 120, and may have a communication path (for example, a serialperipheral interface) formed therein so as to deliver a received UWBsignal to the processor 120 or to receive a control signal from theprocessor 120.

The eSE module 230 may be a module configured to produce credentialinformation according to the situation. The eSE module 230 may deliverthe produced credential information to the UWB module 220. The eSEmodule 230 may be connected to the UWB module 220 by I-squared-C (I2C)communication. The eSE module 230 may be included inside or positionedoutside the UWB module 220.

FIG. 3 is a block diagram of a program module of an electronic devicesupporting a UWB function, according to an embodiment.

Referring to FIG. 3, the electronic device 101 includes a program module310 including an OS configured to control various resources related tothe electronic device 101 and/or various applications driven in the OS,and hardware 320. The OS may be, for example, Android, iOS™, Windows™,Symbian™, Tizen™, or Bada™. FIG. 3 may illustrate a program module 310and hardware 320, which support a UWB function in connection with anAndroid™ OS-based electronic device 101.

The program module 310 may include a kernel 330, a platform 340, anapplication framework 350, or an application layer 370. At least a partof the program module 310 may be preloaded into the electronic device101, or may be downloaded from an external electronic device (forexample, an electronic device 102 or 104 or a server 106). The kernel330 may include a device driver for driving the hardware 320 of theelectronic device 101. For example, the device driver may include atleast one of a Bluetooth driver 331, a UWB driver 333, an NFC driver335, or an eSE SPI driver 327. The platform 340 may include, in order tocontrol the device driver of the kernel 330, at least one of a Bluetoothhole 341, a UWB hole 343, an NFC hole 345, or an eSE SPI hole 347.

The application framework 350 may provide a function commonly requiredby the application layer 370, or may provide various functions to theapplication layer 370 such that the application layer 370 canefficiently use the limited system resource inside the electronic device101. For example, the application framework 350 may include a Bluetoothframework 351, a UWB framework 352, an open multimedia applicationsplatform (OMAP) API 353, a Bluetooth service 354, a secure elementservice 361, and a UWB service 362. The UWB service 362 may include aconnectivity manager 355 for supporting a UWB-related API, a UWB adapter356, security 357, distance measurement 358, localization 359, orhandover 360. The electronic device 101 may measure the location ofmultiple external electronic devices by using the UWB adapter 356, thedistance measurement 358, or the localization 359.

The application layer 370 may include a UWB payment/loyalty application371, a UWB location measurement application 373, or a UWB smart keyapplication 375.

An electronic device 101 may include at least one communication module190; a memory 130; and a processor 120. The processor 120 may beconfigured to identify multiple external electronic devices, locationsof which are to be measured, by using the at least one communicationmodule 190; determine time schedule information based on the number ofthe multiple identified external electronic devices or based on alocation measurement scheme; transmit the time schedule information tothe multiple external electronic devices by using the at least onecommunication module 190; transmit first information to the multipleexternal electronic devices at a first time, based on the time scheduleinformation, by using the at least one communication module 190; receivesecond information from one of the multiple external electronic devicesat a second time, by using the at least one communication module 190;and determine a location of (i.e., a distance from) one of the multipleexternal electronic devices based on the first information or the secondinformation.

The at least one communication module 190 may include an ultra-wide band(UWB) communication module or a communication module different from theUWB communication module.

The processor 120 may be configured to transmit a message foridentifying whether or not to participate in a distance measurement tothe multiple identified external electronic devices, by using the atleast one communication module 190; receive a response message inresponse to the transmitted message; and determine the number of themultiple identified external electronic devices based on the receivedresponse message.

The location measurement scheme may include at least one of an SS-TWRscheme or a DS-TWR scheme.

The location measurement scheme may include an SS-TWR scheme, and theprocessor 120 may be configured, in the SS-TWR scheme, to receive thesecond information from a first external electronic device whichreceived the first information at the second time; and determine adistance from the first external electronic device based on the firstinformation or the second information.

The second information may include information regarding a time at whichthe first external electronic device received the first information orinformation regarding a time at which the first external electronicdevice transmitted the second information, and the processor 120 may beconfigured to obtain information regarding a processing time of thefirst external electronic device based on the second information; anddetermine the distance from the first external electronic device basedon at least one of the obtained information regarding a processing time,information regarding a time at which the first information wastransmitted, or information regarding a time at which the secondinformation was received.

The second information may include information regarding a processingtime of the first external electronic device, and the processor 120 maybe configured to determine the distance from the first externalelectronic device based on at least one of information regarding a timeat which the first information was transmitted, information regarding atime at which the second information was received, or the informationregarding a processing time of the first external electronic deviceincluded in the second information.

The processor 120 may be configured to receive third information from asecond external electronic device which received the first informationat a third time, by using the at least one communication module 190; anddetermine the distance from the second external electronic device basedon the first information or the third information.

The third information may include at least one of information regardinga time at which the second external electronic device received the firstinformation, information regarding a time at which the second externalelectronic device received the second information, or informationregarding a time at which the second external electronic devicetransmitted the third information, and the processor 120 may beconfigured to obtain information regarding a processing time of thesecond external electronic device based on the third information; anddetermine the distance from the second external electronic device basedon the obtained information regarding a processing time, informationregarding a time at which the first information was transmitted, orinformation regarding a time at which the third information wasreceived.

The location measurement scheme may include a DS-TWR scheme, and theprocessor 120 may be configured, by using the at least one communicationmodule 190 in the DS-TWR scheme, to receive the second information fromthe first external electronic device at the second time; receive thirdinformation from the second external electronic device at a third time;transmit fourth information to the first external electronic device andto the second external electronic device at a fourth time; receive fifthinformation from the first external electronic device at a fifth time;and determine the distance from the first external electronic devicebased on at least one of the second information, the fourth information,or the fifth information.

The fifth information may include at least one of information regardinga time at which the first external electronic device transmitted thesecond information, information regarding a time at which the firstexternal electronic device received the fourth information, orinformation regarding a time at which the first external electronicdevice transmitted the fifth information, and the processor 120 may beconfigured to obtain information regarding a processing time of thefirst external electronic device based on the fifth information; anddetermine the distance from the first external electronic device basedon at least one of the obtained information regarding a processing time,information regarding a time at which the second information wasreceived, information regarding a time at which the fourth informationwas transmitted, or information regarding a time at which the fifthinformation was received.

The processor 120 may be configured to receive sixth information fromthe second external electronic device at a sixth time; and determine thedistance from the second external electronic device based on at leastone of the third information, the fourth information, or the sixthinformation.

An electronic device 101 may include at least one communication module190; a memory 130; and a processor 120. The processor 120 may beconfigured to respond to a location measurement request from a firstexternal electronic device by using the at least one communicationmodule 190; receive time schedule information from the first externalelectronic device by using the at least one communication module 190;receive first information from the first external electronic device at afirst time based on the time schedule information, by using the at leastone communication module 190; transmit second information to the firstexternal electronic device and to a second external electronic device ata second time by using the at least one communication module 190;receive third information from the second external electronic device ata third time by using the at least one communication module 190; anddetermine the distance from the second external electronic device basedon the second information or the third information.

The third information may include at least one of information regardinga time at which the second external electronic device received the firstinformation, information regarding a time at which the second externalelectronic device received the second information, or informationregarding a time at which the second external electronic devicetransmitted the third information, and the processor 120 may beconfigured to obtain information regarding a processing time of thesecond external electronic device based on the third information in casethat a SS-TWR scheme is used as a location measurement scheme; anddetermine the distance from the second external electronic device basedon the obtained information regarding a processing time, informationregarding a time at which the second information was transmitted, orinformation regarding a time at which the third information wasreceived.

The processor 120 may be configured to receive fourth information fromthe first external electronic device at a fourth time; obtaininformation regarding a processing time of the first external electronicdevice based on the fourth information when a SS-TWR scheme is used as alocation measurement scheme; and determine the distance from the firstexternal electronic device based on at least one of the obtainedinformation regarding a processing time, information regarding a time atwhich the second information was transmitted, or information regarding atime at which the fourth information was received.

The processor 120 may be configured to receive fourth information fromthe first external electronic device at a fourth time; and determine thedistance from the first external electronic device based on at least oneof the first information, the second information, or the fourthinformation in case that a DS-TWR scheme is used as a locationmeasurement scheme.

The processor 120 may be configured, by using the at least onecommunication module 190, to transmit fifth information to the firstexternal electronic device and to the second external electronic deviceat a fifth time; receive sixth information from the second externalelectronic device at a sixth time; and determine the distance from thesecond external electronic device based on at least one of the thirdinformation, the fifth information, or the sixth information.

FIG. 4A is a flowchart illustrating a method for measuring the locationof multiple electronic devices based on an SS-TWR scheme, according toan embodiment. FIG. 4B is a flowchart illustrating a method formeasuring the location of multiple electronic devices based on an SS-TWRscheme, according to an embodiment.

FIG. 4A illustrates an example in which an electronic device 101, afirst external electronic device 102 and a second external electronicdevice 104 measure the location (or distance) of each electronic devicethrough UWB communication based on an SS-TWR scheme. According to theSS-TWR scheme, electronic devices may exchange a poll message and aresponse message with each other, thereby measuring the distance betweenrespective electronic devices. It will be assumed in the followingdescription that receiving or transmitting “information” refers totransmitting or receiving a poll message or a response message, but theinformation may be transmitted or received in a packet type.

It will be assumed in the following description, in order to helpunderstanding of the disclosure, that the electronic device 101 is amaster electronic device (for example, a first node), and the firstexternal electronic device 102 and the second external electronic device104 are slave electronic devices (for example, a second node and a thirdnode). However, the disclosure is not limited to such an assumption. Inaddition, the first external electronic device 102 may correspond to afirst electronic device, and the second external electronic device 104may correspond to a second electronic device.

Referring to FIG. 4A, the electronic device 101 may identify an externalelectronic device positioned nearby through UWB communication or adifferent type of communication from the UWB (for example, Bluetooth orWi-Fi) at the request of the user, at the request of a connected server108, or at the request of the first external electronic device 102 orthe second external electronic device 104. Alternatively, the electronicdevice 101 may identify an external electronic device positioned withina predetermined distance periodically or selectively, without anyrequest. By identifying such an external electronic device, theelectronic device 101 may identify a first external electronic device102 or a second external electronic device 104. The electronic device101 may determine time scheduling information based on the number ofidentified external electronic devices (for example, two). The timescheduling information may be used by the electronic device 101 toconfigure a time to transmit information (or a message) to the firstexternal electronic device 102 and the second external electronic device104, and a time to receive information from the first externalelectronic device 102 and the second external electronic device 104. Forexample, the electronic device 101 may determine the time scheduleinformation based on the time necessary to acquire or transmitinformation necessary to identify the location of the first externalelectronic device 102 and the second external electronic device 104according to the SS-TWR scheme. The electronic device 101 may transmitthe determined time schedule information to the first externalelectronic device 102 and the second external electronic device 104.

For example, the time schedule information may be configured such thatthe electronic device 101 transmits information at a first time (or timeinterval) SLOT 1 401 and at a fourth time SLOT 4 407, the first externalelectronic device 102 transmits information at a second time SLOT 2 403and at a fifth time SLOT 5 409, and the second external electronicdevice 104 transmits information at a third time SLOT 3 405. The timeschedule information instructs each device to transmit information at agiven time such that each electronic device can transmit informationonly at a time assigned thereto and cannot transmit information at anytime other than the assigned time. In addition, each electronic devicecan identify, based on the time schedule information, which electronicdevice (for example, a device that corresponds to the source address)transmitted information at each time.

The electronic device 101 (for example, master electronic device) maytransmit information to the first external electronic device 102 and thesecond external electronic device 104, based on the time scheduleinformation, through UWB communication. The electronic device 101 maytransmit information to the first external electronic device 102 and thesecond external electronic device 104 based on the time scheduleinformation, and may receive information from the first externalelectronic device 102 and the second external electronic device 104. Thefirst external electronic device 102 (for example, slave electronicdevice) may receive the time schedule information from the electronicdevice 101, may transmit information to the electronic device 101 andthe second external electronic device 104 based on the time scheduleinformation, and may receive information from the electronic device 101and the second external electronic device 104. The second externalelectronic device 104 (for example, slave electronic device) may receivethe time schedule information from the electronic device 101, maytransmit information to the electronic device 101 and the first externalelectronic device 102 based on the time schedule information, and mayreceive information from the electronic device 101 and the firstexternal electronic device 102.

The electronic device 101, the first external electronic device 102, andthe second external electronic device 104 may or may not specify adestination address (for example, recipient address) to receiveinformation, when transmitting information according to a protocolagreed upon between each other. For example, when information has nospecified destination address, each electronic device may analyze (orparse) received information, may read only information necessarytherefor, and may store the same in the memory 130. Although it will beassumed that the destination address is specified, this assumption doesnot limit the scope of the disclosure.

The electronic device 101 may transmit first information P12/P13 to thefirst external electronic device 102 and the second external electronicdevice 104 at the first time 401. The first information may include theidentifier of the electronic device 101 or information regarding thetime at which the electronic device 101 transmits the first information.The electronic device 101 may transmit identical first information tothe first external electronic device 102 and the second externalelectronic device 104, and the first external electronic device 102 andthe second external electronic device 104 may read information onlycorresponding to the first external electronic device 102 and the secondexternal electronic device 104 among the first information, and mayignore information not corresponding to the first external electronicdevice 102 and the second external electronic device 104.

Hereinafter, numerals (for example, 13, 21, and 23) following Englishletters (for example, P and R) may refer to a source address used totransmit information and a destination address used to receiveinformation. The electronic device 101 may correspond to numeral “1”,the first external electronic device 102 may correspond to numeral “2”,and the second external electronic device 104 may correspond to numeral“3”. For example, P12 may correspond to a poll message, which refers tothe first message transmitted from electronic device 101 (for example, adevice that corresponds to the source address numeral “1”) to the firstexternal electronic device 102 (for example, a device that correspondsto the destination address numeral “2”). P13 may correspond to a pollmessage, which refers to the first message transmitted from electronicdevice 101 to the second external electronic device 104 (for example, adevice that corresponds to the destination address numeral “3”). Thefirst information transmitted by the electronic device 101 may beconfigured as a single piece, P12 among the first information maycorrespond to the first external electronic device 102, and P13 maycorrespond to the second external electronic device 104. For example,the first external electronic device 102 may receive first informationincluding P12/P13, may read information corresponding to P12 among thefirst information, and may store the same in the memory 130. Inaddition, the first external electronic device 102 may store informationregarding the time at which the first information was received in thememory 130. The second external electronic device 104 may receive firstinformation including P12/P13, may read information corresponding to P13among the first information, and may store the same in the memory 130.In addition, the second external electronic device 104 may storeinformation regarding the time at which the first information wasreceived in the memory 130.

The first external electronic device 102 may transmit second information(for example, (R21,P21)/P23) to the electronic device 101 or the secondexternal electronic device 104 at a second time SLOT 2 403. R21 mayrefer to a response message transmitted by the first external electronicdevice 102 in response to a poll message (for example, P12) receivedfrom the electronic device 101. P21 may refer to a poll message, whichcorresponds to a first message transmitted by the first externalelectronic device 102 (for example, a device that corresponds to thesource address numeral “2”) to the electronic device 101 (for example, adevice that corresponds to the destination address numeral “1”).“(R21,P21)” may refer to both a first message (for example, P21) sent bythe first external electronic device 102 to the electronic device 101and a response message (for example, R21). P23 may refer to a pollmessage, which corresponds to a first message transmitted by the firstexternal electronic device 102 (for example, a device that correspondsto the source address numeral “2”) to the second external electronicdevice 104 (for example, a device that corresponds to the destinationaddress numeral “3”).

The second information may include information regarding the time atwhich the first external electronic device 102 received the firstinformation, or information regarding the time at which the firstexternal electronic device 102 transmitted the second information. Thesecond information may include information regarding the processing timeof the first external electronic device 102. The information regardingthe processing time of the first external electronic device 102 may befor the electronic device 101 (for example, (R21,P21)). The informationregarding the processing time of the first external electronic device102 may correspond to a period of time between when the first externalelectronic device 102 received the first information and when the sametransmitted the second information. Whether the second information willinclude information regarding the time at which each piece ofinformation was received or transmitted or will include informationregarding the processing time may vary according to the protocol agreedupon between the electronic device 101, the first external electronicdevice 102, and the second external electronic device 104.

At the second time 403, the electronic device 101 may receive the secondinformation, may read information only corresponding to the electronicdevice 101 (for example, (R21, P21)) among the received secondinformation, and may store the read information in the memory 130. Theelectronic device 101 may store information regarding the time at whichthe second information was received in the memory 130. The electronicdevice 101 may measure the distance from the first external electronicdevice 102 based on the first information or the second information. Forexample, when the second information includes information regarding thetime at which the first information was received or informationregarding the time at which the second information was transmitted, theelectronic device 101 may obtain information regarding the processingtime of the first external electronic device 102 based on the secondinformation, and may measure the distance from the first externalelectronic device 102 based on at least one of the obtained processingtime information, the information regarding the time at which the firstinformation was transmitted, or the information regarding the time atwhich the second information was received. When the second informationincludes information regarding the processing time of the first externalelectronic device 102, the electronic device 101 may measure thedistance from the first external electronic device 102 based on at leastone of the processing time information included in the secondinformation, the information regarding the time at which the firstinformation was transmitted, or the information regarding the time atwhich the second information was received.

When receiving the second information from the first external electronicdevice 102, the electronic device 101 may acquire angle of arrival (AOA)information through multiple antennas (for example, antenna module 197,or UWB antenna 1 221 and UWB antenna 2 223), and may identify therelative location of the first external electronic device 102 based onthe acquired AOA information and the distance from the first externalelectronic device 102.

At the second time 403, the second external electronic device 104 mayreceive the second information, may read information only correspondingto the second external electronic device 104 (for example, P23) amongthe received second information, and may store the read information inthe memory 130. P23 may be information needed by the second externalelectronic device 104 to measure the distance from the first externalelectronic device 102. For example, the second external electronicdevice 104 may store information regarding the time at which the firstexternal electronic device 102 transmitted the second information orinformation regarding the time at which the second information wasreceived, in the memory 130.

The second external electronic device 104 may transmit third information(for example, (R31,P31)/(R32,P32)) to the electronic device 101 and thefirst external electronic device 102 at a third time SLOT 3 405. P31 mayrefer to a poll message, which corresponds to a first messagetransmitted by the second external electronic device 104 (for example, adevice that corresponds to the source address numeral “3”) to theelectronic device 101 (for example, a device that corresponds to thedestination address numeral “1”). R31 may refer to a response messagetransmitted by the second external electronic device 104 in response toa poll message P13 received from the electronic device 101. “(R31,P31)”may refer to both a poll message P31 sent by the second externalelectronic device 104 to the electronic device 101 and a responsemessage R31.

The third information may include at least one of information regardingthe time at which the second external electronic device 104 received thefirst information, information regarding the time at which the secondexternal electronic device 104 received the second information, orinformation regarding the time at which the second external electronicdevice 104 transmitted the third information. Additionally oralternatively, the third information may include information regardingthe processing time of the second external electronic device 104. Theinformation regarding the processing time of the second externalelectronic device 104 may include information regarding a period of time(for example, first processing time information) between when the secondexternal electronic device 104 received the first information and whenthe second external electronic device 104 transmitted the thirdinformation, and information regarding a period of time (for example,second processing time information) between when the second externalelectronic device 104 received the second information and when thesecond external electronic device 104 transmitted the third information.The information regarding the processing time of the second externalelectronic device 104 may include first processing time informationcorresponding to the electronic device 101 and second processing timeinformation corresponding to the first external electronic device 102.

At the third time 405, the electronic device 101 may receive the thirdinformation, may read information only corresponding to the electronicdevice 101 (for example, (R31,P31)) among the received thirdinformation, and may store the read information in the memory 130. Theelectronic device 101 may measure the distance from the second externalelectronic device 104 based on at least one of the first informationtransmitted at the first time 401 or the third information received atthe third time 405. For example, when the third information includestime information, the electronic device 101 may obtain informationregarding the processing time of the second external electronic device104 based on the third information, and may measure the distance fromthe second external electronic device 104 based on at least one of theobtained processing time information, information regarding the time atwhich the first information was transmitted, or information regardingthe time at which the third information was received. Additionally oralternatively, when the third information includes processing timeinformation (for example, first processing time information), theelectronic device 101 may measure the distance from the second externalelectronic device 104 based on at least one of the first processing timeinformation, information regarding the time at which the firstinformation was transmitted, or information regarding the time at whichthe third information was received.

When receiving the third information from the second external electronicdevice 104, the electronic device 101 may acquire AOA informationthrough the antenna module 197, and may identify the relative locationof the second external electronic device 104 based on the acquired AOAinformation and the distance from the second external electronic device104.

At the third time 405, the first external electronic device 102 mayreceive third information (for example, (R31,P31)/(R32,P32)) from thesecond external electronic device 104. The first external electronicdevice 102 may read information only corresponding to the first externalelectronic device 102 (for example, (R32,P32)) among the received thirdinformation, and may store the read information in the memory 130.“(R32,P32)” may refer to both a first message (for example, P32)transmitted by the second external electronic device 104 (for example, adevice that corresponds to the source address numeral “3”) to the firstexternal electronic device 102 (for example, a device that correspondsto the destination address numeral “2”) and a response message (forexample, R32). At the third time 405, the first external electronicdevice 102 may measure the distance from the second external electronicdevice 104 based on at least one of the second information transmittedat the second time 403 or the third information received at the thirdtime 405.

When the third information includes time information, the first externalelectronic device 102 may obtain information regarding the processingtime of the second external electronic device 104 based on the thirdinformation, and may measure the distance from the second externalelectronic device 104 based on at least one of the obtained processingtime information, information regarding the time at which the secondinformation was transmitted, or information regarding the time at whichthe third information was received. Additionally or alternatively, whenthe third information includes processing time information (for example,second processing time information), the first external electronicdevice 102 may measure the distance from the second external electronicdevice 104 based on at least one of the second processing timeinformation, information regarding the time at which the secondinformation was transmitted, or information regarding the time at whichthe third information was received.

When receiving the third information from the second external electronicdevice 104, the first external electronic device 102 may acquire AOAinformation through the antenna module 197, and may identify therelative location of the second external electronic device 104 based onthe acquired AOA information and the distance from the second externalelectronic device 104.

The electronic device 101 may transmit fourth information (for example,(P12,R12)/(P13,R13)) to the first external electronic device 102 and thesecond external electronic device 104 at a fourth time SLOT 4 407,“(P12,R12)” may refer to a poll message (for example, P12) transmittedby the electronic device 101 (for example, a device that corresponds tothe source address numeral “1”) to the first external electronic device102 (for example, a device that corresponds to the destination addressnumeral “2”) and a response message (for example, R12) transmitted bythe electronic device 101 in response to a message (for example,(R21,P21)) received from the first external electronic device 102.“(P13,R13)” may refer to a poll message (for example, P13) transmittedby the electronic device 101 (for example, a device that corresponds tothe source address numeral “1”) to the second external electronic device104 (for example, a device that corresponds to the destination addressnumeral “3”) and a response message (for example, R13) transmitted bythe electronic device 101 in response to a message (for example,(R31,P31)) received from the second external electronic device 104.

The fourth information may include at least one of information regardingthe time at which the electronic device 101 received the secondinformation, information regarding the time at which the electronicdevice 101 received the third information, or information regarding thetime at which the electronic device 101 transmitted the fourthinformation. Additionally or alternatively, the fourth information mayinclude information regarding the processing time of the electronicdevice 101. The information regarding the processing time of theelectronic device 101 may include information regarding a period of time(for example, first processing time information) between when theelectronic device 101 received the second information and when the sametransmitted the fourth information, and information regarding a periodof time (for example, second processing time information) between whenthe electronic device 101 received the third information and when theelectronic device 101 transmitted the fourth information. Theinformation regarding the first processing time of the electronic device101 may correspond to the first external electronic device 102, and theinformation regarding the second processing time of the electronicdevice 101 may correspond to the second external electronic device 104.

At the fourth time 407, the first external electronic device 102 mayread information only corresponding to the first external electronicdevice 102 (for example, (P12,R12)) among the received fourthinformation, and may store the read information in the memory 130. Thefirst external electronic device 102 may measure the distance from theelectronic device 101 based on at least one of the second informationtransmitted at the second time 403 or the fourth information received atthe fourth time 407. For example, when the fourth information includestime information, the first external electronic device 102 may obtainprocessing time information based on the fourth information, and maymeasure the distance from the electronic device 101 based on at leastone of the obtained processing time information, information regardingthe time at which the second information was transmitted, or informationregarding the time at which the fourth information was received.

Additionally or alternatively, when the fourth information includesprocessing time information (for example, first processing timeinformation), the first external electronic device 102 may measure thedistance from the electronic device 101 based on at least one of thefirst processing time information, information regarding the time atwhich the second information was transmitted, or information regardingthe time at which the fourth information was received. When receivingthe fourth information from the electronic device 101, the firstexternal electronic device 102 may acquire AOA information throughmultiple antennas, and may identify the relative location of theelectronic device 101 based on the acquired AOA information and thedistance from the electronic device 101.

At the fourth time 407, the second external electronic device 104 mayreceive fourth information (for example, (P12,R12)/(P13,R13)) from theelectronic device 101, may read information only corresponding to thesecond external electronic device 104 (for example, (P13,R13)) among thereceived fourth information, and may store the read information in thememory 130. At the fourth time 407, the second external electronicdevice 104 may measure the distance from the electronic device 101 basedon at least one of the third information transmitted at the third time405 or the fourth information received at the fourth time 407. When thefourth information includes time information, the second externalelectronic device 104 may obtain processing time information based onthe fourth information, and may measure the distance from the electronicdevice 101 based on at least one of the obtained processing timeinformation, information regarding the time at which the thirdinformation was transmitted, or information regarding the time at whichthe fourth information was received.

Additionally or alternatively, when the fourth information includesprocessing time information (for example, second processing timeinformation), the second external electronic device 104 may measure thedistance from the electronic device 101 based on at least one of thesecond processing time information, information regarding the time atwhich the third information was transmitted, or information regardingthe time at which the fourth information was received. When receivingthe fourth information from the electronic device 101, the secondexternal electronic device 104 may acquire AOA information throughmultiple antennas, and may identify the relative location of theelectronic device 101 based on the acquired AOA information and thedistance from the electronic device 101.

The first external electronic device 102 may transmit fifth information(for example, (R21,P21)/P23,R23)) to the electronic device 101 or thesecond external electronic device 104 at a fifth time SLOT 5 409.“(R21,P21)” may refer to both a response message (for example, R21)transmitted by the first external electronic device 102 in response to amessage (for example, (P12,R12)) received from the electronic device 101and a poll message (for example, P21) transmitted by the first externalelectronic device 102 (for example, source address numeral “2”) to theelectronic device 101 (for example, a device that corresponds to thedestination address numeral “1”).

The fifth information may include at least one of information regardingthe time at which the first external electronic device 102 received thethird information, information regarding the time at which the firstexternal electronic device 102 received the fourth information, orinformation regarding the time at which the first external electronicdevice 102 transmitted the fifth information. Additionally oralternatively, the fifth information may include information regardingthe processing time of the first external electronic device 102. Theinformation regarding the processing time of the first externalelectronic device 102 may include information regarding a period of timebetween when the first external electronic device 102 received the thirdinformation and when the first external electronic device 102transmitted the fifth information. Alternatively, the fifth informationmay further include information regarding a period of time between whenthe first external electronic device 102 received the fourth informationand when the first external electronic device 102 transmitted the fifthinformation.

At the fifth time 409, the second external electronic device 104 mayreceive fifth information (for example, (R21,P21)/(P23,R23)) from thefirst external electronic device 102, may read information onlycorresponding to the second external electronic device 104 (for example,(P23,R23)) among the received fifth information, and may store the readinformation in the memory 130. At the fifth time 409, the secondexternal electronic device 104 may measure the distance from the firstexternal electronic device 102 based on at least one of the thirdinformation transmitted at the third time 405 or the fifth informationreceived at the fifth time 409. For example, when the fifth informationincludes time information, the second external electronic device 104 mayobtain processing time information based on the fifth information, andmay measure the distance from the first external electronic device 102based on the obtained processing time information, information regardingthe time at which the third information was transmitted, or informationregarding the time at which the fifth information was received.

Additionally or alternatively, when the fifth information includesprocessing time information, the second external electronic device 104may measure the distance from the first external electronic device 102based on at least one of the processing time information included in thefifth information, information regarding the time at which the thirdinformation was transmitted, or information regarding the time at whichthe fifth information was received. When receiving the fifth informationfrom the first external electronic device 102, the second externalelectronic device 104 may acquire AOA information through multipleantennas, and may identify the relative location of the first externalelectronic device 102 based on the acquired AOA information and thedistance from the first external electronic device 102.

FIG. 4B illustrates an example in which an electronic device 101measures the location of each electronic device through UWBcommunication according to an SS-TWR scheme with three externalelectronic devices that include the first external electronic device102, the second external electronic device 104 and the third externalelectronic device 430. FIG. 4B is different from FIG. 4A in that thereare three external electronic devices, and the remaining operations areidentical to those in FIG. 4A. Repeated descriptions will be shortenedin the following description with reference to FIG. 4B.

Referring to FIG. 4B, the electronic device 101 may identify an externalelectronic device positioned nearby through UWB communication or adifferent type of communication from the UWB (for example, Bluetooth orWi-Fi) at the request of the user, at the request of a connected server108, or at the request of the first external electronic device 102, thesecond external electronic device 104, or the third external electronicdevice 430. The electronic device 101 may determine time schedulinginformation based on the number of identified external electronicdevices (for example, three). For example, the electronic device 101 maydetermine the time schedule information based on the time necessary toacquire or transmit information necessary to identify the location ofthe three electronic devices (for example, the first external electronicdevice 102, the second external electronic device 104, and the thirdexternal electronic device 430) according to the SS-TWR scheme. Theelectronic device 101 may transmit the determined time scheduleinformation to the first external electronic device 102, the secondexternal electronic device 104, and the third external electronic device430.

The electronic device 101 (for example, master electronic device) maytransmit information to the first external electronic device 102, thesecond external electronic device 104, and the third external electronicdevice 430 based on the time schedule information, and may receiveinformation from the first external electronic device 102, the secondexternal electronic device 104, and the third external electronic device430 based on the time schedule information. The first time 401 to thethird time 405 are identical or similar to those described withreference to FIG. 4A, and detailed descriptions thereof will be omittedherein with reference to FIG. 4B. Hereinafter, numerals (for example,12, 13, 14, 21, 23, and 24) following English letters (for example, P,and R) may refer to a source address used to transmit information and adestination address used to receive information. The electronic device101 may correspond to numeral “1”, the first external electronic device102 may correspond to numeral “2”, the second external electronic device104 may correspond to numeral “3”, and the third external electronicdevice 430 may correspond to numeral “4”.

At the fourth time 407, the third external electronic device 430 maytransmit fourth information (for example, (R41,P41)/(R42,P42)/(R43,P43))to the electronic device 101, the first external electronic device 102,or the second external electronic device 104. “(R41,P41)” may refer toboth a poll message (for example, P41) transmitted by the third externalelectronic device 430 (for example, a device that corresponds to thesource address numeral “4”) to the electronic device 101 (for example, adevice that corresponds to the destination address numeral “1”) and aresponse message (for example, R41). “(R42,P42)” may refer to both apoll message (for example, P42) transmitted by the third externalelectronic device 430 (for example, source address numeral “4”) to thefirst external electronic device 102 (for example, a device thatcorresponds to the destination address numeral “2”) and a responsemessage (for example, R42). “(R43,P43)” may refer to both a poll message(for example, P43) transmitted by the third external electronic device430 (for example, a device that corresponds to the source addressnumeral “4”) to the second external electronic device 104 (for example,a device that corresponds to the destination address numeral “3”) and aresponse message (for example, R43).

For example, the fourth information may include at least one ofinformation regarding the time at which the third external electronicdevice 430 received the first information, information regarding thetime at which the third external electronic device 430 received thesecond information, information regarding the time at which the thirdexternal electronic device 430 received the third information, orinformation regarding the time at which the third external electronicdevice 430 transmitted the fourth information. Additionally oralternatively, the fourth information may include information regardingthe processing time of the third external electronic device 430. Theinformation regarding the processing time of the third externalelectronic device 430 may include first processing time informationcorresponding to a period of time between when the third externalelectronic device 430 received the first information and when the thirdexternal electronic device 430 transmitted the fourth information;second processing time information corresponding to a period of timebetween when the third external electronic device 430 received thesecond information and when the third external electronic device 430transmitted the fourth information; and third processing timeinformation corresponding to a period of time between when the thirdexternal electronic device 430 received the third information and whenthe same transmitted the fourth information. The first processing timeinformation may be needed by the electronic device 101 to measure thedistance from the third external electronic device 430. The secondprocessing time information may be needed by the first externalelectronic device 102 to measure the distance from the third externalelectronic device 430. The third processing time information may beneeded by the second external electronic device 104 to measure thedistance from the third external electronic device 430.

Whether the fourth information will include information regarding thetime at which each piece of information was received or transmitted orwill include information regarding the processing time may varyaccording to the protocol agreed upon between the electronic device 101,the first external electronic device 102, the second external electronicdevice 104, and the third external electronic device 430.

At the fourth time 407, the electronic device 101 may receive fourthinformation (for example, (R41,P41)/(R42,P42)/(R43,P43)) from the thirdexternal electronic device 430, may read information only correspondingto the electronic device 101 (for example, (R41,P41)) among the receivedfourth information, and may store the read information in the memory130. At the fourth time 407, the electronic device 101 may measure thedistance from the third external electronic device 430 based on at leastone of the first information transmitted at the first time 401 or thefourth information received at the fourth time 407. For example, whenthe fourth information includes time information, the electronic device101 may obtain information regarding the processing time of the thirdexternal electronic device 430 based on the fourth information, and maymeasure the distance from the third external electronic device 430 basedon at least one of the obtained processing time information, theinformation regarding the time at which the first information wastransmitted, or the information regarding the time at which the fourthinformation was received. Alternatively, when the fourth informationincludes information regarding the processing time of the third externalelectronic device 430, the electronic device 101 may measure thedistance from the first external electronic device 102 based on at leastone of the processing time information included in the fourthinformation, the information regarding the time at which the firstinformation was transmitted, or the information regarding the time atwhich the fourth information was received.

When receiving the fourth information from the third external electronicdevice 430, the electronic device 101 may acquire AOA informationthrough multiple antennas (for example, antenna module 197, or UWBantenna 1 221 and UWB antenna 2 223), and may identify the relativelocation of the third external electronic device 430 based on theacquired AOA information and the distance from the third externalelectronic device 430.

At the fourth time 407, the first external electronic device 102 mayreceive fourth information (for example, (R41,P41)/(R42,P42)/(R43,P43))from the third external electronic device 430, may read information onlycorresponding to the first external electronic device 102 (for example,(R42,P42)), among the received fourth information, and may store thesame in the memory 130. At the fourth time 407, the first externalelectronic device 102 may measure the distance from the third externalelectronic device 430 based on at least one of the second informationtransmitted at the second time 403 or the fourth information received atthe fourth time 407. For example, when the fourth information includestime information, the first external electronic device 102 may obtaininformation regarding the processing time of the third externalelectronic device 430 based on the fourth information, and may measurethe distance from the third external electronic device 430 based on atleast one of the obtained processing time information, the informationregarding the time at which the second information was transmitted, orthe information regarding the time at which the fourth information wasreceived. Alternatively, when the fourth information includesinformation regarding the processing time of the third externalelectronic device 430, the first external electronic device 102 maymeasure the distance from the third external electronic device 430 basedon at least one of the processing time information included in thefourth information, the information regarding the time at which thesecond information was transmitted, or the information regarding thetime at which the fourth information was received.

When receiving the fourth information from the third external electronicdevice 430, the first external electronic device 102 may acquire AOAinformation through multiple antennas (for example, antenna module 197,or UWB antenna 1 221 and UWB antenna 2 223), and may identify therelative location of the third external electronic device 430 based onthe acquired AOA information and the distance from the third externalelectronic device 430.

At the fourth time 407, the second external electronic device 104 mayreceive fourth information (for example, (R41,P41)/(R42,P42)/(R43,P43))from the third external electronic device 430, may read information onlycorresponding to the second external electronic device 104 (for example,(R43,P43)) among the received fourth information, and may store the samein the memory 130. At the fourth time 407, the second externalelectronic device 104 may measure the distance from the third externalelectronic device 430 based on at least one of the third informationtransmitted at the third time 405 or the fourth information received atthe fourth time 407. For example, when the fourth information includestime information, the second external electronic device 104 may obtaininformation regarding the processing time of the third externalelectronic device 430 based on the fourth information, and may measurethe distance from the third external electronic device 430 based on atleast one of the obtained processing time information, the informationregarding the time at which the third information was transmitted, orthe information regarding the time at which the fourth information wasreceived. Alternatively, when the fourth information includesinformation regarding the processing time of the third externalelectronic device 430, the second external electronic device 104 maymeasure the distance from the third external electronic device 430 basedon at least one of the processing time information included in thefourth information, the information regarding the time at which thethird information was transmitted, or the information regarding the timeat which the fourth information was received.

When receiving the fourth information from the third external electronicdevice 430, the second external electronic device 104 may acquire AOAinformation through multiple antennas (for example, antenna module 197,or UWB antenna 1 221 and UWB antenna 2 223), and may identify therelative location of the third external electronic device 430 based onthe acquired AOA information and the distance from the third externalelectronic device 430.

At the fifth time 409, the electronic device 101 may transmit fifthinformation (for example, (P12,R12)/(P13,R13)/(P14,R14)) to the firstexternal electronic device 102 and to the third external electronicdevice 430. “(P12,R12)” may refer to both a poll message (for example,P12) transmitted by the electronic device 101 (for example, a devicecorresponding to the source address numeral “1”) to the first externalelectronic device 102 (for example, a device corresponding to thedestination address numeral “2”) and a response message (for example,R12). “(P13,R13)” may refer to both a poll message (for example, P13)transmitted by the electronic device 101 (for example, a devicecorresponding to the source address numeral “1”) to the second externalelectronic device 104 (for example, a device corresponding to thedestination address numeral “3”) and a response message (for example,R13). “(P14,R14)” may refer to both a poll message (for example, P14)transmitted by the electronic device 101 (for example, a devicecorresponding to the source address numeral “1”) to the third externalelectronic device 430 (for example, a device corresponding to thedestination address numeral “4”) and a response message (for example,R14). The fifth information may include at least one of informationregarding the time at which the electronic device 101 received thesecond information, information regarding the time at which theelectronic device 101 received the third information, informationregarding the time at which the electronic device 101 received thefourth information, or information regarding the time at which theelectronic device 101 transmitted the fifth information.

Additionally or alternatively, the fifth information may includeinformation regarding the processing time of the electronic device 101.The information regarding the processing time of the electronic device101 may include first processing time information corresponding to aperiod of time between when the electronic device 101 received thesecond information and when the same transmitted the fifth information,second processing time information corresponding to a period of timebetween when the electronic device 101 received the third informationand when the electronic device 101 transmitted the fifth information,and third processing time information corresponding to a period of timebetween when the electronic device 101 received the fourth informationand when the electronic device 101 transmitted the fifth information.The first processing time information may be needed by the firstexternal electronic device 102 to measure the distance from theelectronic device 101. The second processing time information may beneeded by the second external electronic device 104 to measure thedistance from the electronic device 101. The third processing timeinformation may be needed by the third external electronic device 430 tomeasure the distance from the electronic device 101.

At the fifth time 409, the first external electronic device 102 mayreceive the fifth information (for example,(P12,R12)/(P13,R13)/(P14,R14)) from the electronic device 101, may readinformation only corresponding to the first external electronic device102 (for example, (P12,R12)) among the received fifth information, andmay store the read information in the memory 130. At the fifth time 409,the first external electronic device 102 may measure the distance fromthe electronic device 101 based on at least one of the secondinformation transmitted at the second time 403 or the fifth informationreceived at the fifth time 409.

When the fifth information includes time information, the first externalelectronic device 102 may obtain information regarding the processingtime of the electronic device 101 based on the fifth information, andmay measure the distance from the electronic device 101 based on atleast one of the obtained processing time information, the informationregarding the time at which the second information was transmitted, orthe information regarding the time at which the fifth information wasreceived. Alternatively, when the fifth information includes informationregarding the processing time of the electronic device 101, the firstexternal electronic device 102 may measure the distance from theelectronic device 101 based on at least one of the processing timeinformation included in the fifth information, the information regardingthe time at which the second information was transmitted, or theinformation regarding the time at which the fifth information wasreceived.

When receiving the fifth information from the electronic device 101, thefirst external electronic device 102 may acquire AOA information throughmultiple antennas and may identify the relative location of theelectronic device 101 based on the acquired AOA information and thedistance from the electronic device 101.

At the fifth time 409, the second external electronic device 104 mayreceive the fifth information (for example,(P12,R12)/(P13,R13)/(P14,R14)) from the electronic device 101, may readinformation only corresponding to the second external electronic device104 (for example, (P13,R13)) among the received fifth information, andmay store the read information in the memory 130. At the fifth time 409,the second external electronic device 104 may measure the distance fromthe electronic device 101 based on at least one of the third informationtransmitted at the third time 405 or the fifth information received atthe fifth time 409. For example, when the fifth information includestime information, the second external electronic device 104 may obtaininformation regarding the processing time of the electronic device 101based on the fifth information, and may measure the distance from theelectronic device 101 based on at least one of the obtained processingtime information, the information regarding the time at which the thirdinformation was transmitted, or the information regarding the time atwhich the fifth information was received. Alternatively, when the fifthinformation includes information regarding the processing time of theelectronic device 101, the second external electronic device 104 maymeasure the distance from the electronic device 101 based on at leastone of the processing time information included in the fifthinformation, the information regarding the time at which the thirdinformation was transmitted, or the information regarding the time atwhich the fifth information was received.

When receiving the fifth information from the electronic device 101, thesecond external electronic device 104 may acquire AOA informationthrough multiple antennas and may identify the relative location of theelectronic device 101 based on the acquired AOA information and thedistance from the electronic device 101.

At the fifth time 409, the third external electronic device 430 mayreceive the fifth information (for example,(P12,R12)/(P13,R13)/(P14,R14)) from the electronic device 101, may readinformation only corresponding to the third external electronic device430 (for example, (P14,R14)) among the received fifth information, andmay store the read information in the memory 130. At the fifth time 409,the third external electronic device 430 may measure the distance fromthe electronic device 101 based on at least one of the fourthinformation transmitted at the fourth time 407 or the fifth informationreceived at the fifth time 409. For example, when the fifth informationincludes time information, the third external electronic device 430 mayobtain information regarding the processing time of the electronicdevice 101 based on the fifth information, and may measure the distancefrom the electronic device 101 based on at least one of the obtainedprocessing time information, the information regarding the time at whichthe fourth information was transmitted, or the information regarding thetime at which the fifth information was received. Alternatively, whenthe fifth information includes information regarding the processing timeof the electronic device 101, the third external electronic device 430may measure the distance from the electronic device 101 based on atleast one of the processing time information included in the fifthinformation, the information regarding the time at which the fourthinformation was transmitted, or the information regarding the time atwhich the fifth information was received.

When receiving the fifth information from the electronic device 101, thethird external electronic device 430 may acquire AOA information throughmultiple antennas and may identify the relative location of theelectronic device 101 based on the acquired AOA information and thedistance from the electronic device 101.

At the sixth time 411, the first external electronic device 102 maytransmit sixth information (for example, (R21,P21)/(P23,R23)/(P24,R24)to the electronic device 101, the second external electronic device 104,and the third external electronic device 430. “(R21,P21)” may refer toboth a poll message (for example, P21) transmitted by the first externalelectronic device 102 (for example, a device that corresponds to sourceaddress numeral “2”) to the electronic device 101 (for example, a devicethat corresponds to destination address numeral “1”) and a responsemessage (for example, R21). “(P23,R23)” may refer to both a poll message(for example, P23) transmitted by the first external electronic device102 (for example, a device that corresponds to source address numeral“2”) to the second external electronic device 104 (for example, a devicethat corresponds to destination address numeral “3”) and a responsemessage (for example, R23). “(P24,R24)” may refer to both a poll message(for example, P24) transmitted by the first external electronic device102 (for example, a device that corresponds to source address numeral“2”) to the third external electronic device 430 (for example, a devicethat corresponds to destination address numeral “4”) and a responsemessage (for example, R24).

The sixth information may include at least one of information regardingthe time at which the first external electronic device 102 received thethird information, information regarding the time at which the firstexternal electronic device 102 received the fourth information,information regarding the time at which the first external electronicdevice 102 received the fifth information, or information regarding thetime at which the first external electronic device 102 transmitted thesixth information. Additionally or alternatively, the sixth informationmay include information regarding the processing time of the firstexternal electronic device 102. The information regarding the processingtime of the first external electronic device 102 may include at leastone of first processing time information corresponding to a period oftime between when the first external electronic device 102 received thethird information and when the first external electronic device 102transmitted the sixth information, or second processing time informationcorresponding to a period of time between when the first externalelectronic device 102 received the fourth information and when the firstexternal electronic device 102 transmitted the sixth information. Inaddition, the information regarding the processing time of the firstexternal electronic device 102 may further include third processing timeinformation corresponding to a period of time between when the firstexternal electronic device 102 received the fifth information and whenthe first external electronic device 102 transmitted the sixthinformation.

The first processing time information may be needed by the secondexternal electronic device 104 to measure the distance from the firstexternal electronic device 102. The second processing time informationmay be needed by the third external electronic device 430 to measure thedistance from the first external electronic device 102. The thirdprocessing time information may be needed by the electronic device 101to measure the distance from the first external electronic device 102.

At the sixth time 411, the second external electronic device 104 mayreceive the sixth information (for example,(R21,P21)/(P23,R23)/(P24,R24)) from the first external electronic device102, may read information only corresponding to the second externalelectronic device 104 (for example, (P23,R23)) among the received sixthinformation, and may store the same in the memory 130. At the sixth time411, the second external electronic device 104 may measure the distancefrom the first external electronic device 102 based on at least one ofthe third information transmitted at the third time 405 or the sixthinformation received at the sixth time 411. For example, when the sixthinformation includes time information, the second external electronicdevice 104 may obtain information regarding the processing time of thefirst external electronic device 102 based on the sixth information, andmay measure the distance from the first external electronic device 102based on at least one of the obtained processing time information, theinformation regarding the time at which the third information wastransmitted, or the information regarding the time at which the sixthinformation was received. Alternatively, when the sixth informationincludes information regarding the processing time of the first externalelectronic device 102, the second external electronic device 104 maymeasure the distance from the first external electronic device 102 basedon at least one of the processing time information included in the sixthinformation, the information regarding the time at which the thirdinformation was transmitted, or the information regarding the time atwhich the sixth information was received.

When receiving the sixth information from the first external electronicdevice 102, the second external electronic device 104 may acquire AOAinformation through multiple antennas and may identify the relativelocation of the first external electronic device 102 based on theacquired AOA information and the distance from the first externalelectronic device 102.

At the sixth time 411, the third external electronic device 430 mayreceive the sixth information (for example,(R21,P21)/(P23,R23)/(P24,R24)) from the first external electronic device102, may read information only corresponding to the third externalelectronic device 430 (for example, (P24,R24)) among the received sixthinformation, and may store the read information in the memory 130. Atthe sixth time 411, the third external electronic device 430 may measurethe distance from the first external electronic device 102 based on atleast one of the fourth information transmitted at the fourth time 407or the sixth information received at the sixth time 411. For example,when the sixth information includes time information, the third externalelectronic device 430 may obtain information regarding the processingtime of the first external electronic device 102 based on the sixthinformation, and may measure the distance from the first externalelectronic device 102 based on at least one of the obtained processingtime information, the information regarding the time at which the fourthinformation was transmitted, or the information regarding the time atwhich the sixth information was received. Alternatively, when the sixthinformation includes information regarding the processing time of thefirst external electronic device 102, the third external electronicdevice 430 may measure the distance from the first external electronicdevice 102 based on at least one of the processing time informationincluded in the sixth information, the information regarding the time atwhich the fourth information was transmitted, or the informationregarding the time at which the sixth information was received.

When receiving the sixth information from the first external electronicdevice 102, the third external electronic device 430 may acquire AOAinformation through multiple antennas and may identify the relativelocation of the first external electronic device 102 based on theacquired AOA information and the distance from the first externalelectronic device 102.

At the seventh time 413, the second external electronic device 104 maytransmit seventh information (for example,(R31,P31)/(R32,P32)/(P34,R34)) to the electronic device 101, the firstexternal electronic device 102, and the third external electronic device430. “(R31,P31)” may refer to both a poll message (for example, P31)transmitted by the second external electronic device 104 (for example, adevice that corresponds to the source address numeral “3”) to theelectronic device 101 (for example, a device that corresponds to thedestination address numeral “1”) and a response message (for example,R31). “(R32,P32)” may refer to both a poll message (for example, P32)transmitted by the second external electronic device 104 (for example, adevice that corresponds to the source address numeral “3”) to the firstexternal electronic device 102 (for example, a device that correspondsto the destination address numeral “2”) and a response message (forexample, R32). “(P34,R34)” may refer to both a poll message (forexample, P34) transmitted by the second external electronic device 104(for example, a device that corresponds to the source address numeral“3”) to the third external electronic device 430 (for example, a devicethat corresponds to the destination address numeral “4”) and a responsemessage (for example, R34).

The seventh information may include at least one of informationregarding the time at which the second external electronic device 104received the fourth information, information regarding the time at whichthe second external electronic device 104 received the fifthinformation, information regarding the time at which the second externalelectronic device 104 received the sixth information, or informationregarding the time at which the second external electronic device 104transmitted the seventh information. Additionally or alternatively, theseventh information may include information regarding the processingtime of the second external electronic device 104. The informationregarding the processing time of the second external electronic device104 may include information regarding a period of time between when thesecond external electronic device 104 received the fourth informationand when the same transmitted the seventh information. The informationregarding the processing time of the second external electronic device104 may be needed by the third external electronic device 430 to measurethe distance from the second external electronic device 104. Theinformation regarding the processing time of the second externalelectronic device 104 may further include information regarding a periodof time between when the second external electronic device 104 receivedthe fifth information and when the same transmitted the seventhinformation, or information regarding a period of time between when thesecond external electronic device 104 received the sixth information andwhen the same transmitted the seventh information.

At the seventh time 413, the third external electronic device 430 mayreceive the seventh information (for example,(R31,P31)/(R32,P32)/(P34,R34)) from the second external electronicdevice 104, may read information only corresponding to the thirdexternal electronic device 430 (for example, (P34,R34)) among thereceived seventh information, and may store the read information in thememory 130. At the seventh time 413, the third external electronicdevice 430 may measure the distance from the second external electronicdevice 104 based on at least one of the fourth information transmittedat the fourth time 407 or the seventh information received at theseventh time 413. For example, when the seventh information includestime information, the third external electronic device 430 may obtaininformation regarding the processing time of the second externalelectronic device 104 based on the seventh information, and may measurethe distance from the second external electronic device 104 based on atleast one of the obtained processing time information, the informationregarding the time at which the fourth information was transmitted, orthe information regarding the time at which the seventh information wasreceived. Alternatively, when the seventh information includesinformation regarding the processing time of the second externalelectronic device 104, the third external electronic device 430 maymeasure the distance from the second external electronic device 104based on at least one of the processing time information included in theseventh information, the information regarding the time at which thefourth information was transmitted, or the information regarding thetime at which the seventh information was received.

When receiving the seventh information from the second externalelectronic device 104, the third external electronic device 430 mayacquire AOA information through multiple antennas and may identify therelative location of the second external electronic device 104 based onthe acquired AOA information and the distance from the second externalelectronic device 104.

Different types of packets may be used according to whether the SS-TWRscheme or the DS-TWR scheme is employed. Hereinafter, FIG. 4C and FIG.4D illustrate packets according to the SS-TWR scheme, and FIG. 7C, FIG.7D, and FIG. 7E illustrate packets according to the DS-TWR scheme.

FIG. 4C is a diagram illustrating packets transmitted based on theSS-TWR scheme according to various embodiments, and FIG. 4D is a diagramillustrating packets transmitted based on to the SS-TWR scheme accordingto various embodiments.

FIG. 4C illustrates packets including time information or processingtime information, according to an embodiment.

Referring to FIG. 4C, when the electronic device 101 or the firstexternal electronic device 102 follows the MAC frame format of 802.15.4,the source address and the source personal account number (PAN)identification (ID) may be implemented in the MAC header (MHR). Thefollowing description may be directed to specifying payload fields ofpackets. Respective pieces of information included in the payload fields(for example, source address 441, message type 443, first destinationaddress 445, or second destination address 447) may include data havinga small size of less than 1-4 bytes.

First information 440 transmitted by the electronic device 101 at thefirst time 401 in FIG. 4A may include at least one of a source address441, a message type 443, a first destination address 445, or a seconddestination address 447. The source address 441 may be an identifierassigned to the electronic device 101 that transmitted the firstinformation 440, and may be “1”, for example. The message type 443refers to a message type to which the first information corresponds and,since a poll message and a response message are exchanged according tothe SS-TWR scheme, the message type 443 may be one of a poll message ora response message. The message type 443 of the first information 440 isinitially sent by the electronic device 101 and thus may correspond to apoll message. The first destination address 445 is an identifierassigned to the first external electronic device 102 that receives thefirst information 440 and may be “2”, for example. The seconddestination address 447 is an identifier assigned to the second externalelectronic device 104 that receives the first information 440 and may be“3”, for example.

At the first time 401, the first external electronic device 102 mayreceive the first information 440 and may identify, based on the sourceaddress 441, that the first information 440 was transmitted from theelectronic device 101, may identify that the message type 443corresponds to a poll message, and may identify, based on the firstdestination address 445, that the first information 440 was sent to thefirst external electronic device 102. The first external electronicdevice 102 may store information regarding the time at which the firstinformation 440 was received in the memory 130. In addition, at thefirst time 401, the second external electronic device 104 may receivethe first information 440 and may identify, based on the source address441, that the first information 440 was transmitted from the electronicdevice 101, may identify that the message type 443 corresponds to a pollmessage, and may identify, based on the second destination address 447,that the first information 440 was sent to the second externalelectronic device 104. The second external electronic device 104 maystore information regarding the time at which the first information 440was received in the memory 130.

At the second time 403, the first external electronic device 102 maytransmit second information 450. The second information 450 may includeinformation 451 corresponding to a poll message and information 453corresponding to a response message. The information 451 correspondingto a poll message may indicate that the second information 450 was sentby the first external electronic device 102 (for example, SOUR is “2”),that the message type corresponds to a poll message (for example, TYPEis “poll”), and that the second information 450 was transmitted to theelectronic device 101 (for example, DEST is “1”) or to the secondexternal electronic device 104 (for example, DEST is “3”). Theinformation 453 corresponding to a response message may indicate thatthe device to receive the response message is the electronic device 101(for example, DEST is “1”), and may include information regarding thetime at which the first information 440 was received (rxTime) 455, orinformation regarding the time at which the second information 450 wastransmitted (txTime) 457.

Upon receiving the second information 450 at the second time 403, theelectronic device 101 may read the information 451 corresponding to apoll message and may store the information regarding the time at whichthe second information 450 was received in the memory 130. Theelectronic device 101 may read the information 453 corresponding to aresponse message and may obtain information regarding the processingtime of the first external electronic device 102 based on the rxTime 455and the txTime 457 included in the second information 450. Theelectronic device 101 may measure the distance from the first externalelectronic device 102 based on at least one of the obtained processingtime information, the information regarding the time at which the firstinformation 440 was transmitted, or the information regarding the timeat which second information 450 was received. The electronic device 101may measure the distance from the first external electronic device 102by using Equation (1) below:Distance=((time at which second information was received−time at whichfirst information was transmitted)−processing time)/2*speed oflight  Equation (1)

Upon receiving the second information 450 at the second time 403, thesecond external electronic device 104 may read the information 451corresponding to a poll message and may store the information regardingthe time at which the second information 450 was received in the memory130.

Additionally or alternatively, at the second time 403, the firstexternal electronic device 102 may transmit second information 460. Thesecond information 460 may include information 461 corresponding to apoll message and information 463 corresponding to a response message.The information 461 corresponding to a poll message may indicate thatthe second information 460 was sent by the first external electronicdevice 102 (for example, SOUR is “2”), the message type corresponds to apoll message (for example, TYPE is “poll”), and the second information460 was transmitted to the electronic device 101 (for example, DEST is“1”) or to the second external electronic device 104 (for example, DESTis “3”). The information 451 corresponding to a poll message of thesecond information 450 may be identical to the information 461corresponding to a poll message of the second information 460. Theinformation 463 corresponding to a response message may indicate thatthe device to receive the response message is the electronic device 101(for example, DEST is “1”), and may include information regarding theprocessing time of the first external electronic device (procTime) 465.

Upon receiving the second information 460 at the second time 403, theelectronic device 101 may read the information 461 corresponding to apoll message and may store the information regarding the time at whichthe second information 460 was received in the memory 130. Theelectronic device 101 may read the information 463 corresponding to aresponse message and may measure the distance from the first externalelectronic device 102 based on at least one of the processing timeinformation 465 included in the second information 460, the informationregarding the time at which the first information 440 was transmitted,or the information regarding the time at which second information 460was received.

The second information 460 is similar to the second information 450, butunlike the second information 450, the processing time information hasalready been obtained and recorded in the second information 460, andthe electronic device 101 may accordingly use the processing timeinformation 465 included in the second information 460, when measuringthe distance from the first external electronic device 102, instead ofobtaining the processing time information. Upon receiving the secondinformation 460 at the second time 403, the second external electronicdevice 104 may read the information 461 corresponding to a poll messageand may store the information regarding the time at which the secondinformation 460 was received in the memory 130.

FIG. 4D illustrates packets including processing time information,according to an embodiment.

Referring to FIG. 4D, prior to transmitting information according to theSS-TWR scheme, the electronic device 101 (for example, master electronicdevice) may transmit time schedule information to a first externalelectronic device 102 and a second external electronic device 104 (forexample, slave electronic devices). The time schedule information mayconfigure a device to transmit information at each time such that eachelectronic device can transmit information only at a time assignedthereto and cannot transmit information outside the time assignedthereto. In addition, since each electronic device transmits or receivesinformation based on the time schedule information, each electronicdevice can be aware of which electronic device (for example, sourceaddress) transmitted information at each time, which electronic device(for example, destination address) is to receive information, and whattype of message is to be received. Therefore, each electronic device mayhave a broadcast-type packet configuration.

At the first time 401, the electronic device 101 may transmit firstinformation 470. The electronic device 101 may transmit the firstinformation 470 as a type of packet having no payload field. The firstinformation 470 may include a source address 471. Upon receiving thefirst information 470 at the first time 401, the first externalelectronic device 102 may store information regarding the time at whichthe first information 470 was received in the memory 130. Upon receivingthe first information 470 at the first time 401, the second externalelectronic device 104 may store information regarding the time at whichthe first information 470 was received in the memory 130.

At the second time 403, the first external electronic device 102 maytransmit second information 480. The second information 480 may includea source address 481, a destination address 483, or processing timeinformation 485. The source address 481 may mean that the secondinformation 480 was sent by the first external electronic device 102(for example, SOUR is “2”). The destination address 483 may indicate theelectronic device 101 which is supposed to read the processing timeinformation 485 included in the second information 480 (for example,DEST is “1”). The processing time information 485 may refer toinformation regarding the period of time between when the first externalelectronic device 102 received the first information 470 and when thefirst external electronic device 102 transmitted the second information480. Upon receiving the second information 480 at the second time 403,the electronic device 101 may store information regarding the time atwhich the second information 480 was received in the memory 130.

In addition, the electronic device 101 may measure the distance from thefirst external electronic device 102 based on at least one of theprocessing time information 485 included in the second information 480,the information regarding the time at which the first information 470was transmitted, or the information regarding the time at which thesecond information 480 was received. At the second time 403, the secondexternal electronic device 104 may receive the second information 480and may store information regarding the time at which the secondinformation 480 was received in the memory 130. For example, the secondexternal electronic device 104 may record only information regarding thetime at which the second information 480 was received, because thesecond information 480 has no other information corresponding to itself(for example, DEST is “2”).

At the third time 405, the second external electronic device 104 maytransmit third information 490. The third information 490 may include atleast one of a source address 491, a first destination address 493,first processing time information 495, a second destination address 497,or second processing time information 499. The source address 491 mayindicate that the third information 490 was sent by the second externalelectronic device 104 (for example, SOUR is “3”). The first destinationaddress 493 may indicate the electronic device 101 which is supposed toread the first processing time information 495 included in the thirdinformation 490 (for example, DEST is “1”). The first processing timeinformation 495 may refer to information regarding the period of timebetween when the second external electronic device 104 received thefirst information 470 and when the second external electronic device 104transmitted the third information 490. The second destination address497 may indicate the first external electronic device 102 which issupposed to read the second processing time information 499 included inthe third information 490 (for example, DEST is “2”). The secondprocessing time information 499 may refer to information regarding theperiod of time between when the second external electronic device 104received the second information 480 and when the second externalelectronic device 104 transmitted the third information 490.

At the third time 405, the electronic device 101 may receive the thirdinformation 490 and may store information regarding the time at whichthe third information 490 was received in the memory 130. In addition,the electronic device 101 may measure the distance from the secondexternal electronic device 104 based on at least one of the firstprocessing time information 495 included in the third information 490,the information regarding the time at which the first information 470was transmitted, or the information regarding the time at which thethird information 490 was received.

At the third time 405, the first external electronic device 102 mayreceive the third information 490 and may store information regardingthe time at which the third information 490 was received in the memory130. In addition, the first external electronic device 102 may measurethe distance from the second external electronic device 104 based on atleast one of the second processing time information 499 included in thethird information 490, the information regarding the time at which thesecond information 480 was transmitted, or the information regarding thetime at which the third information 490 was received.

FIG. 5 is a flowchart 500 illustrating a method for operating a masterelectronic device based on the SS-TWR scheme, according to anembodiment.

The electronic device 101 described in FIG. 5 may operate as a masterelectronic device. It may be assumed, to help understanding of thedisclosure, that when the electronic device 101 operates as a masterelectronic device, a first external electronic device 102 and a secondexternal electronic device 104 operate as slave electronic devices.

Referring to FIG. 5, in step 501, the processor 120 of the electronicdevice 101 identifies an external electronic device through acommunication module 190. It may be assumed in the following descriptionthat there are at least two external electronic devices. For convenienceof description, “an external electronic device” will be usedinterchangeably with “external electronic devices”. The processor 120may identify external electronic devices by using a first type ofcommunication (for example, UWB) or a second type of communication (forexample, Bluetooth™ or Wi-Fi). Alternatively, the processor 120 mayidentify external electronic devices through a server 108 to which theelectronic device 101 is currently connected. Additionally oralternatively, the processor 120 may identify external electronicdevices if a designated condition is satisfied. For example, theprocessor 120 may identify external electronic devices positioned withina predetermined distance if a specific event is detected (for example,entering a game group configuration window) while a game application isbeing executed.

The processor 120 may identify external electronic devices positionedwithin a short distance by using a topology such as Bluetooth™, Wi-Fi,or neighbor awareness networking (NAN) communication. Alternatively, ifthe electronic device 101 is connected to an access point, the processor120 may identify external electronic devices connected to the sameaccess point. For example, the processor 120 may identify externalelectronic devices forming a topology through a first communication type(for example, UWB) or may identify external electronic devices forming atopology through a second communication type (for example, acommunication type other than UWB). For example, when connected toexternal electronic devices through Bluetooth™, the processor 120 mayhave a peer-to-peer connection to the external electronic devices.Alternatively, when connected to external electronic devices throughWi-Fi, the processor 120 may be connected to the same access point andthus connected to the external electronic devices through a startopology or a peer-to-peer connection (for example, Wi-Fi direct)between the electronic devices.

The processor 120 may identify external electronic devices that satisfya designated condition through a server 108 (for example, game server)or a web page, or through application execution. For example, if theelectronic device 101 is not connected to external electronic devicesthrough the first type of communication and the second type ofcommunication, and if the same support virtual group formation or astate of a virtual connection between electronic devices (for example, astate in which communication is possible between the electronic devicesby an instant messenger application) is used, the processor 120 mayidentify external electronic devices connected to a virtual group orexternal electronic devices in a state of virtual connection.

In step 503, the processor 120 receives a distance (or location)measurement request. For example, the processor 120 may transmit amessage (or data) to the identified external electronic devices throughthe communication module 190 so as to identify whether or not they willparticipate in distance measurement, and may identify (or determine)that the distance measurement request has been made if a responsemessage is received in response to the transmitted message. Additionallyor alternatively, the processor 120 may transmit the distancemeasurement participation identification message periodically orselectively (for example, at the user's request) through thecommunication module 190. Additionally or alternatively, the processor120 may receive a request for measuring the distance from the externalelectronic devices from the user through an input device input device150. Additionally or alternatively, the processor 120 may identify thatthere is a distance measurement request if an application (for example,a game application) that uses the distance from external electronicdevices is executed.

In step 505, the processor 120 determines time schedule information. Thetime schedule information may be used to configure a time at which theelectronic device 101 transmits information (or a message) to theexternal electronic devices or a time at which the electronic device 101receives information from the external electronic devices. The processor120 may determine the time schedule information based on a locationmeasurement scheme or the number of external electronic devices thattransmitted response messages in response to the distance measurementrequest. It may be assumed in the description of FIG. 5 that theelectronic device 101 and two electronic devices (for example, the firstexternal electronic device 102 and the second external electronic device104) measure locations according to the SS-TWR scheme as in FIG. 4A. Theprocessor 120 may determine a master electronic device as the device towhich information is to be transmitted first, and may determine theexternal electronic devices as devices to which information is to betransmitted at the remaining times.

According to the SS-TWR scheme, it is only after a response message isreceived in connection with a poll message that the distance from adifferent electronic device can be measured. For example, the processor120 may assign a first time and a fourth time to the electronic device101, may assign a second time and a fifth time to the first externalelectronic device 102, and may assign a third time to the secondexternal electronic device 104. For example, the electronic device 101and the external electronic devices may transmit information only attimes assigned thereto, and may receive information at other times thatare not assigned thereto.

The processor 120 may determine times (for example, slots) to beassigned to external electronic devices based on response messages (orresponse data) received from the external electronic devices. Theprocessor 120 may assign a preliminary time for external electronicdevices that are not identified. For example, when determining the timeschedule information, the processor 120 may assign a preliminary timewhen there will be external electronic devices that can, but do notalready, participate in communication, in addition to providing thetimes for external electronic devices currently participating in thecommunication. The processor 120 may publicize (for example, broadcast)a preliminary time every time the time schedule information isdetermined. External electronic devices wanting to later participate inthe communication may inform the electronic device 101 of the intent toparticipate during the preliminary time. In addition, the processor 120may use, instead of the time, a method that allows contention betweenmedia, such as a contention access period (CAP), the specification ofwhich is currently publicized, as in Institute of Electrical andElectronics Engineers (IEEE) 802.1:5.4 or 802.15.8. The processor 120may implement an operation of determining time schedule informationaccording to the CAP publicized in 802.15.4 or 802.15.8, or may use auser-specific time assignment scheme if necessary.

The processor 120 may receive the time schedule information from theserver 108, or may receive the time schedule information from anotherexternal electronic device functionally connected to the electronicdevice 101. The electronic device 101 that determines the time scheduleinformation may be referred to as a “master electronic device”, and theelectronic device that receives the time schedule information may bereferred to as a “slave electronic device”. The electronic device 101 orthe server 108 may determine the master electronic device based onvarious conditions. The electronic device 101 and the externalelectronic devices may be classified as a master electronic device andslave electronic devices, and an operation of configuring the masterelectronic device and the slave electronic devices may be furtherincluded. For example, the electronic device 101 or the server 108 maydetermine, as the master electronic device, at least one of anelectronic device that generated a group in connection with a gameapplication, an electronic device that requested a distance measurement,and an electronic device having a good performance, among the electronicdevice 101 and the external electronic devices, and may determine theremaining devices as the slave electronic devices.

In step 507, the processor 120 transmits the determined time scheduleinformation to the external electronic devices. The processor 120 maytransmit the determined time schedule information through thecommunication module 190 in a broadcast type communication, or maytransmit the determined time schedule information to external electronicdevices that responded to the distance measurement request. Theprocessor 120 may transmit the determined time schedule information tothe external electronic devices through the first type of communicationor the second type of communication. The processor 120 may transmit thedetermined time schedule information to the external electronic devicesthrough the server 108.

For example, when using a contention free period (CFP) interval based on802.15.4 for time assignment, the processor 120 may transmit thedetermined time schedule information to the external electronic devicesthrough a beacon message based on 802.15.4. Alternatively, when using aCFP interval based on 802.15.8, the processor 120 may transmit thedetermined time schedule information to the external electronic devicesby using a sync period according to the 802.15.8 standard. The processor120 may transmit the time schedule information according to a protocolagreed upon in advance between the electronic device 101 and theexternal electronic devices.

In step 509, the processor 120 transmits first information (orsignal/data) through the communication module 190 at a first time (forexample, SLOT 1 401 in FIG. 4A). The processor 120 may identify (orconfirm) the time when information can be transmitted, based on the timeschedule information, and may transmit the first information at thefirst time through the communication module 190. The first information(for example, P12/P13 in FIG. 4A) may include the identifier of theelectronic device 101 (for example, source address “1”) or informationregarding the time at which the electronic device 101 transmitted thefirst information. The first information may be transmitted in abroadcast type of communication or transmitted while the destinationaddress (for example, destination addresses “2” and “3”) is configuredtherein. The first information may be transmitted to the first externalelectronic device 102 and the second external electronic device 104. Theprocessor 120 may store information regarding the time at which thefirst information was transmitted in the memory 130. After receiving thefirst information, the first external electronic device 102 and thesecond external electronic device 104 may store information regardingthe time at which the first information was received.

In step 511, the processor 120 receives second information (for example,(R21,P21)/P23 in FIG. 4A) at a second time (for example, SLOT 2 403 inFIG. 4A) from the first external electronic device 102 through thecommunication module 190, and may determine (or identify/measure) thedistance from the first external electronic device 102. The processor120 may read information only corresponding to the electronic device 101(for example, (R21,P21)), among the received second information, andstore the read information in the memory 130. The processor 120 maystore information regarding the time at which the second information wasreceived in the memory 130, or may read time information or processingtime information included in the second information and may store thesame in the memory 130. The processor 120 may multiply the signalarrival time (for example, information regarding the time at which thefirst information was transmitted, or information regarding the time atwhich the second information was received) by the speed of light,thereby obtaining the distance from the first external electronic device102.

The second information may include information regarding the time atwhich the first external electronic device 102 received the firstinformation, or information regarding the time at which the firstexternal electronic device 102 transmitted the second information.Additionally or alternatively, the second information may includeinformation regarding the processing time of the first externalelectronic device 102. The information regarding the processing time ofthe first external electronic device 102 is for the electronic device101, and may correspond to a period of time between when the firstexternal electronic device 102 received the first information and whenthe first external electronic device 102 transmitted the secondinformation. Whether the second information will include informationregarding the time at which each piece of information was received ortransmitted or will include information regarding the processing timemay vary according to the protocol agreed upon between the electronicdevice 101, the first external electronic device 102, and the secondexternal electronic device 104. After receiving the second information,the second external electronic device 104 may store informationregarding the time at which the second information was received.

The processor 120 may determine the distance from the first externalelectronic device 102 based on the first information or the secondinformation. When the second information includes information regardingthe time at which the first information was received, or informationregarding the time at which the second information was transmitted, theprocessor 120 may obtain information regarding the processing time ofthe first external electronic device 102 based on the secondinformation, and may calculate the distance from the first externalelectronic device 102 based on at least one of the obtained processingtime information, information regarding the time at which the firstinformation was transmitted, or the information regarding the time atwhich the second information was received. Additionally oralternatively, when the second information includes informationregarding the processing time of the first external electronic device102, the processor 120 may measure the distance from the first externalelectronic device 102 based on at least one of the processing timeinformation included in the second information, the informationregarding the time at which the first information was transmitted, orthe information regarding the time at which the second information wasreceived.

When receiving the second information from the first external electronicdevice 102, the processor 120 may acquire AOA information throughmultiple antennas (for example, antenna module 197, or UWB antenna 1 221and UWB antenna 2 223), and may identify the relative location of thefirst external electronic device 102 based on the acquired AOAinformation and the distance from the first external electronic device102.

In step 513, the processor 120 receives third information at a thirdtime (for example, SLOT 3 405 in FIG. 4A), and may determine (oridentify/measure) the distance from the second external electronicdevice 104. The third information (for example, (R31,P31)/(R32,P32) inFIG. 4A) may include at least one of information regarding the time atwhich the second external electronic device 104 received the firstinformation, information regarding the time at which the second externalelectronic device 104 received the second information, or informationregarding the time at which the second external electronic device 104transmitted the third information.

Additionally or alternatively, the third information may includeinformation regarding the processing time of the second externalelectronic device 104. The information regarding the processing time ofthe second external electronic device 104 may include informationregarding a period of time (for example, first processing timeinformation) between when the second external electronic device 104received the first information and when the second external electronicdevice 104 transmitted the third information, and information regardinga period of time (for example, second processing time information)between when the second external electronic device 104 received thesecond information and when the second external electronic device 104transmitted the third information. The information regarding theprocessing time of the second external electronic device 104 may includefirst processing time information corresponding to the electronic device101 and second processing time information corresponding to the firstexternal electronic device 102.

The processor 120 may measure the distance from the second externalelectronic device 104 based on at least one of the first informationtransmitted at the first time 401 or the third information received atthe third time 405. For example, when the third information includestime information, the processor 120 may obtain information regarding theprocessing time of the second external electronic device 104 based onthe third information, and may measure the distance from the secondexternal electronic device 104 based on at least one of the obtainedprocessing time information, information regarding the time at which thefirst information was transmitted, or information regarding the time atwhich the third information was received. Additionally or alternatively,when the third information includes processing time information (forexample, first processing time information), the processor 120 maymeasure the distance from the second external electronic device 104based on at least one of the first processing time information,information regarding the time at which the first information wastransmitted, or information regarding the time at which the thirdinformation was received.

When receiving the third information from the second external electronicdevice 104, the processor 120 may acquire AOA information through theantenna module 197, and may identify the relative location of the secondexternal electronic device 104 based on the acquired AOA information andthe distance from the second external electronic device 104.

Upon receiving the third information (for example, (R31,P31)/(R32,P32)in FIG. 4A) at the third time 405, the first external electronic device102 may store information regarding the time at which the thirdinformation was received. At the third time 405, the first externalelectronic device 102 may receive the third information and maydetermine the distance from the second external electronic device 104.The first external electronic device 102 may determine the distance fromthe second external electronic device 104 based on at least one of thesecond information or the third information. For example, when the thirdinformation includes time information, the first external electronicdevice 102 may obtain information regarding the processing time of thesecond external electronic device 104 based on the third information,and may measure the distance from the second external electronic device104 based on at least one of the obtained processing time information,information regarding the time at which the second information wastransmitted, or information regarding the time at which the thirdinformation was received.

Additionally or alternatively, when the third information includesprocessing time information (for example, second processing timeinformation), the first external electronic device 102 may measure thedistance from the second external electronic device 104 based on atleast one of the second processing time information, informationregarding the time at which the second information was transmitted, orinformation regarding the time at which the third information wasreceived.

In step 515, the processor 120 transmits fourth information at a fourthtime (for example, SLOT 4 407 in FIG. 4A). The fourth information (forexample, (P12,R12)/(P13,R13) in FIG. 4A) may be transmitted to the firstexternal electronic device 102 and the second external electronic device104. The fourth information may include at least one of informationregarding the time at which the electronic device 101 received thesecond information, information regarding the time at which theelectronic device 101 received the third information, or informationregarding the time at which the electronic device 101 transmitted thefourth information.

Additionally or alternatively, the fourth information may includeinformation regarding the processing time of the electronic device 101.The information regarding the processing time of the electronic device101 may include information regarding a period of time (for example,first processing time information) between when the electronic device101 received the second information and when the electronic device 101transmitted the fourth information, and information regarding a periodof time (for example, second processing time information) between whenthe electronic device 101 received the third information and when theelectronic device 101 transmitted the fourth information. Theinformation regarding the first processing time of the electronic device101 may correspond to the first external electronic device 102, and theinformation regarding the second processing time of the electronicdevice 101 may correspond to the second external electronic device 104.

Additionally or alternatively, upon receiving the fourth information atthe fourth time, the first external electronic device 102 may storeinformation regarding the time at which the fourth information wasreceived. At the fourth time, the first external electronic device 102may receive the fourth information (for example, P12,R12)/(P13,R13) inFIG. 4A) and may determine the distance from the electronic device 101.The first external electronic device 102 may measure the distance fromthe electronic device 101 based on at least one of the secondinformation transmitted at the second time 403 or the fourth informationreceived at the fourth time 407.

For example, when the fourth information includes time information, thefirst external electronic device 102 may obtain processing timeinformation based on the fourth information, and may measure thedistance from the electronic device 101 based on at least one of theobtained processing time information, information regarding the time atwhich the second information was transmitted, or information regardingthe time at which the fourth information was received. Additionally oralternatively, when the fourth information includes processing timeinformation (for example, first processing time information), the firstexternal electronic device 102 may measure the distance from theelectronic device 101 based on at least one of the first processing timeinformation, information regarding the time at which the secondinformation was transmitted, or information regarding the time at whichthe fourth information was received.

Additionally or alternatively, when the electronic device 101, the firstexternal electronic device 102, and the second external electronicdevice 104 identified the distance between each other or the location ofeach electronic device, the electronic device 101 may identify (ordetermine) the relative location between the electronic devices.

FIG. 6 is a flowchart 600 illustrating a method for operating a slaveelectronic device based on the SS-TWR scheme, according to anembodiment.

FIG. 6 describes a method wherein an electronic device 101 operates as aslave electronic device. It may be assumed that when the electronicdevice 101 operates as a slave electronic device, a first externalelectronic device 102 operates as a master electronic device.

Referring to FIG. 6, in step 601, the processor 120 of the electronicdevice 101 responds to a distance measurement request by using UWBcommunication. For example, the processor 120 may receive a distancemeasurement request from the first external electronic device 102 or theserver 108 if a request for measuring the distance from other externalelectronic devices is received from the user through an input device150, or if an application (for example, game application) that uses thedistance from external electronic devices is executed.

In step 603, the processor 120 receives time schedule information fromthe first external electronic device 102. The time schedule informationmay include a time at which the electronic device 101 transmitsinformation (or a message) to the external electronic devices, or a timeat which the electronic device 101 receives information from theexternal electronic devices. The processor 120 may receive time scheduleinformation determined by the first external electronic device 102 orthe server 108, and may store the time schedule information in thememory 130.

In step 605, the processor 120 receives first information at a firsttime (for example, SLOT 1 401 in FIG. 4A). The first information (forexample, P12/P13 in FIG. 4A) may include the identifier of the firstexternal electronic device 102 or information regarding the time atwhich the first external electronic device 102 transmitted the firstinformation. The first information may be transmitted to the electronicdevice 101 or the second external electronic device 104. The processor120 may receive the first information and may read information onlycorresponding to the electronic device 101 (for example, P12). Inaddition, the processor 120 may store information regarding the time atwhich the first information was received in the memory 130.

In step 607, the processor 120 transmits second information at a secondtime (for example, SLOT 2 403 in FIG. 4A). The second information (forexample, ((R21,P21)/P23 in FIG. 4A) may include information regardingthe time at which the electronic device 101 received the firstinformation, or information regarding the time at which the electronicdevice 101 transmitted the second information. Additionally oralternatively, the second information may include information regardingthe processing time of the electronic device 101. The processing timeinformation may correspond to a period of time between when theelectronic device 101 received the first information and when the sametransmitted the second information. The processor 120 may storeinformation regarding the time at which the second information wastransmitted in the memory 130.

Upon receiving the second information at the second time, the firstexternal electronic device 102 may determine the location of theelectronic device 101 based on the first information or the secondinformation. When the second information includes information regardingthe time at which the first information was received or informationregarding the time at which the second information was transmitted, thefirst external electronic device 102 may obtain information regardingthe processing time of the electronic device 101 based on the secondinformation, and may measure the distance from the electronic device 101based on at least one of the obtained processing time information,information regarding the time at which the first information wastransmitted, or information regarding the time at which the secondinformation was received. Additionally or alternatively, when the secondinformation includes information regarding the processing time of theelectronic device 101, the first external electronic device 102 maymeasure the distance from the electronic device 101 based on at leastone of the processing time information included in the secondinformation, information regarding the time at which the firstinformation was transmitted, or information regarding the time at whichthe second information was received.

In step 609, the processor 120 receives third information at a thirdtime (for example, SLOT 3 405 in FIG. 4A) and may determine the distancefrom the second external electronic device 104. The third information(for example, (R31,P31)/(R32,P32) in FIG. 4A) may include at least oneof information regarding the time at which the second externalelectronic device 104 received the first information, informationregarding the time at which the second external electronic device 104received the second information, or information regarding the time atwhich the second external electronic device 104 transmitted the thirdinformation.

Additionally or alternatively, the third information may includeinformation regarding the processing time of the second externalelectronic device 104. The information regarding the processing time ofthe second external electronic device 104 may include informationregarding a period of time (for example, first processing timeinformation) between when the second external electronic device 104received the first information and when the second external electronicdevice 104 transmitted the third information, and information regardinga period of time (for example, second processing time information)between when the second external electronic device 104 received thesecond information and when the second external electronic device 104transmitted the third information. The information regarding theprocessing time of the second external electronic device 104 may includefirst processing time information corresponding to the first externalelectronic device 102 and second processing time informationcorresponding to the electronic device 101.

At the third time 405, the processor 120 may receive the thirdinformation, may read information only corresponding to the electronicdevice 101 (for example, (R32,P32)), among the received thirdinformation, and may store the read information in the memory 130. Theprocessor 120 may determine the distance from the second externalelectronic device 104 based on at least one of the second information orthe third information stored in the memory 130. For example, when thethird information includes time information, the processor 120 mayobtain information regarding the processing time of the second externalelectronic device 104 based on the third information, and may measurethe distance from the second external electronic device 104 based on atleast one of the obtained processing time information, informationregarding the time at which the second information was transmitted, orinformation regarding the time at which the third information wasreceived.

Additionally or alternatively, when the third information includesprocessing time information (for example, first processing timeinformation), the processor 120 may measure the distance from the secondexternal electronic device 104 based on at least one of the firstprocessing time information, information regarding the time at which thesecond information was transmitted, or information regarding the time atwhich the third information was received.

Upon receiving the third information from the second external electronicdevice 104, the processor 120 may acquire AOA information throughmultiple antennas, and may identify the relative location of the secondexternal electronic device 104 based on the acquired AOA information andthe distance from the second external electronic device 104.

Upon receiving the third information at the third time, the firstexternal electronic device 102 may store information regarding the timeat which the third information was received. At the third time, thefirst external electronic device 102 may receive the third informationfor example, ((R31,P31)/(R32,P32) in FIG. 4A) and may determine thedistance from the second external electronic device 104. For example,when the third information includes time information, the first externalelectronic device 102 may obtain information regarding the processingtime of the second external electronic device 104 based on the thirdinformation, and may measure the distance from the second externalelectronic device 104 based on at least one of the obtained processingtime information, information regarding the time at which the firstinformation was transmitted, or information regarding the time at whichthe third information was received.

Additionally or alternatively, when the third information includesprocessing time information (for example, first processing timeinformation), the first external electronic device 102 may measure thedistance from the second external electronic device 104 based on atleast one of the first processing time information, informationregarding the time at which the first information was transmitted, orinformation regarding the time at which the third information wasreceived.

In step 611, the processor 120 receives fourth information at a fourthtime (for example, SLOT 4 407 in FIG. 4A) and may determine the distancefrom the first external electronic device 102. The fourth information(for example, (P12,R12)/(P13,R13) in FIG. 4A) may be received from thefirst external electronic device 102. The fourth information may includeat least one of information regarding the time at which the firstexternal electronic device 102 received the second information,information regarding the time at which first external electronic device102 received the third information, or information regarding the time atwhich first external electronic device 102 transmitted the fourthinformation. Additionally or alternatively, the fourth information mayinclude information regarding the processing time of the first externalelectronic device 102. The information regarding the processing time ofthe first external electronic device 102 may include informationregarding a period of time (for example, first processing timeinformation) between when the first external electronic device 102received the second information and when the same transmitted the fourthinformation, and information regarding a period of time (for example,second processing time information) between when the electronic device101 received the third information and when the same transmitted thefourth information. The information regarding the first processing timeof the first external electronic device 102 may correspond to theelectronic device 101, and the information regarding the secondprocessing time of the first external electronic device 102 maycorrespond to the second external electronic device 104.

The processor 120 may read information only corresponding to theelectronic device 101 (for example, (P12,R12)), and may store the readinformation in the memory 130. The processor 120 may measure thedistance from the first external electronic device 102 based on at leastone of the second information transmitted at the second time 403 or thefourth information received at the fourth time 407. For example, whenthe fourth information includes time information, the processor 120 mayobtain processing time information based on the fourth information, andmay measure the distance from the first external electronic device 102based on at least one of the obtained processing time information,information regarding the time at which the second information wastransmitted, or information regarding the time at which the fourthinformation was received. Additionally or alternatively, when the fourthinformation includes processing time information (for example, firstprocessing time information), the processor 120 may measure the distancefrom the first external electronic device 102 based on at least one ofthe first processing time information, information regarding the time atwhich the second information was transmitted, or information regardingthe time at which the fourth information was received.

Upon receiving the fourth information from the first external electronicdevice 102, the processor 120 may acquire AOA information throughmultiple antennas, and may identify the relative location of the firstexternal electronic device 102 based on the acquired AOA information andthe distance from the first external electronic device 102.

At the fourth time 407, the second external electronic device 104 mayreceive fourth information (for example, (P12,R12)/(P13,R13)) from thefirst external electronic device 102, may read information onlycorresponding to the second external electronic device 104 (P13,R13),among the received fourth information, and may store the readinformation in the memory 130. At the fourth time 407, the secondexternal electronic device 104 may measure the distance from the firstexternal electronic device 102 based on at least one of the thirdinformation transmitted at the third time 405 or the fourth informationreceived at the fourth time 407. For example, when the fourthinformation includes time information, the second external electronicdevice 104 may obtain processing time information based on the fourthinformation, and may measure the distance from the first externalelectronic device 102 based on at least one of the obtained processingtime information, information regarding the time at which the thirdinformation was transmitted, or information regarding the time at whichthe fourth information was received.

Additionally or alternatively, when the fourth information includesprocessing time information (for example, second processing timeinformation), the second external electronic device 104 may measure thedistance from the first external electronic device 102 based on at leastone of the second processing time information, information regarding thetime at which the third information was transmitted, or informationregarding the time at which the fourth information was received. Whenreceiving the fourth information from the first external electronicdevice 102, the second external electronic device 104 may acquire AOAinformation through multiple antennas, and may identify the relativelocation of the electronic device 101 based on the acquired AOAinformation and the distance from the electronic device 101.

In step 613, the processor 120 transmits fifth information at a fifthtime (for example, SLOT 5 409 in FIG. 4A). The fifth information (forexample, (R21,P21)/(P23,R23) in FIG. 4A) may be transmitted to the firstexternal electronic device 102 and the second external electronic device104. The fifth information may include at least one of informationregarding the time at which the electronic device 101 received the thirdinformation, information regarding the time at which the electronicdevice 101 received the fourth information, or information regarding thetime at which the electronic device 101 transmitted the fifthinformation. In addition, the fifth information may include informationregarding the processing time of the electronic device 101. Theinformation regarding the processing time of the electronic device 101may include time information regarding a period of time between when theelectronic device 101 received the third information and when the sametransmitted the fifth information. Alternatively, the fifth informationmay further include information regarding a period of time between whenthe electronic device 101 received the fourth information and when thesame transmitted the fifth information.

Upon receiving the fifth information from the electronic device 101 atthe fifth time 409, the second external electronic device 104 may readinformation only corresponding to the second external electronic device104 (P23,R23), among the received fifth information, and may store theread information in the memory 130. The second external electronicdevice 104 may measure the distance from the first external electronicdevice 102 based on at least one of the third information transmitted atthe third time 405 or the fifth information received at the fifth time409. For example, when the fifth information includes time information,the second external electronic device 104 may obtain processing timeinformation based on the fifth information, and may measure the distancefrom the first external electronic device 102 based on the obtainedprocessing time information, information regarding the time at which thethird information was transmitted, or information regarding the time atwhich the fifth information was received.

Additionally or alternatively, when the fifth information includesprocessing time information, the second external electronic device 104may measure the distance from the first external electronic device 102based on at least one of the processing time information included in thefifth information, information regarding the time at which the thirdinformation was transmitted, or information regarding the time at whichthe fifth information was received. When receiving the fifth informationfrom the first external electronic device 102, the second externalelectronic device 104 may acquire AOA information through multipleantennas, and may identify the relative location of the first externalelectronic device 102 based on the acquired AOA information and thedistance from the first external electronic device 102.

FIG. 7A is a flowchart illustrating a method for measuring the locationof multiple electronic devices based on a DS-TWR scheme, according to anembodiment. FIG. 7B is a flowchart illustrating a method for measuringthe location of multiple electronic devices based on the DS-TWR scheme,according to an embodiment.

FIG. 7A illustrates an example in which an electronic device 101, thefirst external electronic device 102 and the second external electronicdevice 104 measure the location of each electronic device through UWBcommunication according to a DS-TWR scheme. According to the DS-TWRscheme, electronic devices may exchange a poll message, a responsemessage, and a final message with each other, thereby measuring thedistance from each electronic device. Information may be received ortransmitted when a poll message, a response message, and a final messageare transmitted or received. The information may be transmitted orreceived in a packet type. Operations of the electronic device 101identifying external electronic devices or receiving a locationmeasurement request are identical or similar to those in FIG. 4A, andrepeated descriptions thereof will be omitted with reference to FIG. 7A.Numerals (for example, 12, 13, 21, 23) following English letters (forexample, P, F) may refer to a source address used to transmitinformation and a destination address used to receive information. Theelectronic device 101 may correspond to numeral “1”, the first externalelectronic device 102 may correspond to numeral “2”, and the secondexternal electronic device 104 may correspond to numeral “3”.

Referring to FIG. 7A, the electronic device 101 may identify an externalelectronic device positioned nearby through UWB communication or adifferent type of communication from the UWB (for example, Bluetooth™ orWi-Fi) at the request of the user, at the request of a connected server108, or at the request of the first external electronic device 102 orthe second external electronic device 104. Alternatively, the electronicdevice 101 may identify an external electronic device positioned withina predetermined distance periodically or selectively, without anyrequest. The electronic device 101 may determine time schedulinginformation based on the number of identified external electronicdevices (for example, two) or the location measurement scheme (forexample, DS-TWR scheme). The electronic device 101 may transmit thedetermined time schedule information to the first external electronicdevice 102 and the second external electronic device 104.

The electronic device 101 (for example, master electronic device) maytransmit information to the first external electronic device 102 and thesecond external electronic device 104 based on the time scheduleinformation, and may receive information from the first externalelectronic device 102 and the second external electronic device 104based on the time schedule information. The first external electronicdevice 102 (for example, slave electronic device) may receive the timeschedule information from the electronic device 101, may transmitinformation to the electronic device 101 and the second externalelectronic device 104 based on the time schedule information, and mayreceive information from the electronic device 101 and the secondexternal electronic device 104 based on the time schedule information.

The second external electronic device 104 (for example, slave electronicdevice) may receive the time schedule information from the electronicdevice 101, may transmit information to the electronic device 101 andthe first external electronic device 102 based on the time scheduleinformation, and may receive information from the electronic device 101and the first external electronic device 102 based on the time scheduleinformation. The first time (for example, SLOT 1 701), the second time(for example, SLOT 2 703), and the third time (for example, SLOT 3 705)are identical or similar to those described with reference to FIG. 4Awith reference to FIG. 7A.

In FIG. 7A, according to the DS-TWR scheme, the first informationtransmitted by the electronic device 101 at the first time 701 mayinclude information regarding the time at which the electronic device101 transmitted the first information. The second informationtransmitted by the first external electronic device 102 at the secondtime 703 may include information regarding the time at which the firstexternal electronic device 102 transmitted the second information. Thethird information transmitted by the second external electronic device104 at the third time 705 may include information regarding the time atwhich the second external electronic device 104 transmitted the thirdinformation. When a poll message or a response message is sent accordingto the DS-TWR scheme, which is different from the SS-TWR scheme, thepoll message or response message may include only information regardingthe time at which information (for example, first information, secondinformation or third information) of the subject who sends information(for example, the electronic device 101 or the second externalelectronic device 104) is sent. According to the DS-TWR scheme, whenfirst information to third information is transmitted (for example, whena poll message or a response message is transmitted), time informationreceived from a different device may not be included, and when fourthinformation to sixth information is sent (for example, when a finalmessage is transmitted), time information received from a differentdevice may be included.

The electronic device 101 may transmit fourth information (for example,(F12,R12)/(F13,R13)) to the first external electronic device 102 and thesecond external electronic device 104 at a fourth time (for example,SLOT 4 707). “(F12,R12)” may refer to both a final message (for example,F12) transmitted by the electronic device 101 (for example, sourceaddress numeral “1”) to the first external electronic device 102 (forexample, destination address numeral “2”) and a response message (forexample, R12) transmitted by the electronic device 101 in response to amessage (for example, (R21,P21)) received from the first externalelectronic device 102. “(F13,R13)” may refer to both a final message(for example, F13) transmitted by the electronic device 101 (forexample, source address numeral “1”) to the second external electronicdevice 104 (for example, destination address numeral “3”) and a responsemessage (for example, R13) transmitted by the electronic device 101 inresponse to a message (for example, (R31,P31)) received from the secondexternal electronic device 104. The fourth information may include atleast one of information regarding the time at which the electronicdevice 101 transmitted the first information, information regarding thetime at which the electronic device 101 received the second information,information regarding the time at which the electronic device 101received the third information, or information regarding the time atwhich the electronic device 101 transmitted the fourth information.

When information is transmitted according to the DS-TWR scheme, which isdifferent from the SS-TWR scheme, no processing time information may beincluded, and information regarding the time at which each piece ofinformation was transmitted or received may be included. The purpose ofpacket efficiency may be the fact that information includes timeinformation but does not processing time information.

After receiving the fourth information at the fourth time 707, the firstexternal electronic device 102 may read information only correspondingto the first external electronic device 102 (for example, (F12,R12))among the received fourth information, may store the read information inthe memory 130, and may store information regarding the time at whichthe fourth information was received. The first external electronicdevice 102 may measure the distance from the electronic device 101 basedon at least one of the first information received at the first time 701,the second information transmitted at the second time 703, or the fourthinformation received at the fourth time 707. For example, first externalelectronic device 102 may obtain processing time information based onthe fourth information, and may measure the distance from the electronicdevice 101 based on at least one of the obtained processing timeinformation, information regarding the time at which the firstinformation was received, information regarding the time at which thesecond information was transmitted, or information regarding the time atwhich the fourth information was received. Upon receiving the fourthinformation from the electronic device 101, the first externalelectronic device 102 may acquire AOA information through multipleantennas and may identify the relative location of the electronic device101 based on the acquired AOA information and the distance from theelectronic device 101.

At the fourth time 707, the second external electronic device 104 mayread information only corresponding to the second external electronicdevice 104 (for example, (F13,R13)) among received the fourthinformation, may store the read information in the memory 130, and maystore information regarding the time at which the fourth information wasreceived. The second external electronic device 104 may measure thedistance from the electronic device 101 based on at least one of thefirst information received at the first time 701, the third informationtransmitted at the third time 705, or the fourth information received atthe fourth time 707.

The second external electronic device 104 may obtain processing timeinformation based on the fourth information, and may measure thedistance from the electronic device 101 based on at least one of theobtained processing time information, information regarding the time atwhich the first information was received, information regarding the timeat which the third information was transmitted, or information regardingthe time at which the fourth information was received. Upon receivingthe fourth information from the electronic device 101, the secondexternal electronic device 104 may acquire AOA information throughmultiple antennas and may identify the relative location of theelectronic device 101 based on the acquired AOA information and thedistance from the electronic device 101.

At a fifth time (for example, SLOT 5 709), the first external electronicdevice 102 may transmit fifth information (for example, F21/(F23,R23))to the electronic device 101 or the second external electronic device104. F21 may refer to a final message transmitted by the first externalelectronic device 102 (for example, source address numeral “2”) inresponse to a message (for example, (F12,R12)) that from the electronicdevice 101 (for example, destination address numeral “1”). “(F23,R23)”may refer to both a final message (for example, F23) transmitted by thefirst external electronic device 102 (for example, source addressnumeral “2”) to the second external electronic device 104 (for example,destination address numeral “3”) and a response message (for example,R23) transmitted by the first external electronic device 102 in responseto a message (for example, (R32,P32)) received from the second externalelectronic device 104. The fifth information may include at least one ofinformation regarding the time at which the first external electronicdevice 102 received the third information, information regarding thetime at which the first external electronic device 102 received thefourth information, or information regarding the time at which the firstexternal electronic device 102 transmitted the fifth information.

At the fifth time 709, the electronic device 101 may receive fifthinformation (for example, F21/(F23,R23)) from the first externalelectronic device 102, may read information only corresponding to theelectronic device 101 (for example, F21) among the received fifthinformation, and may store the read information in the memory 130. Theelectronic device 101 may measure the distance from the first externalelectronic device 102 based on at least one of the second informationreceived at the second time 703, the fourth information transmitted atthe fourth time 707, or the fifth information received at the fifth time709. For example, the electronic device 101 may obtain processing timeinformation based on the fifth information, and may measure the distancefrom the first external electronic device 102 based on at least one ofthe obtained processing time information, information regarding the timeat which the second information was received, information regarding thetime at which the fourth information was transmitted, or informationregarding the time at which the fifth information was received.

Upon receiving the fifth information from the first external electronicdevice 102, the electronic device 101 may acquire AOA informationthrough multiple antennas and may identify the relative location of thefirst external electronic device 102 based on the acquired AOAinformation and the distance from the first external electronic device102.

At the fifth time 709, the second external electronic device 104 mayreceive fifth information (for example, F21/(F23,R23)) from the firstexternal electronic device 102, may read information only correspondingto the second external electronic device 104 (for example, (F23,R23))among the received fifth information, and may store the read informationin the memory 130. The second external electronic device 104 may measurethe distance from the first external electronic device 102 based on atleast one of the second information received at the second time 703, thethird information transmitted at the third time 705 or the fifthinformation received at the fifth time 709. For example, the secondexternal electronic device 104 may obtain processing time informationbased on the fifth information, and may measure the distance from thefirst external electronic device 102 based on at least one of theobtained processing time information, information regarding the time atwhich the second information was received, information regarding thetime at which the third information was transmitted, or informationregarding the time at which the fifth information was received.

Upon receiving the fifth information from the first external electronicdevice 102, the second external electronic device 104 may acquire AOAinformation through multiple antennas and may identify the relativelocation of the first external electronic device 102 based on theacquired AOA information and the distance from the first externalelectronic device 102.

At a sixth time (for example, SLOT 6 711), the second externalelectronic device 104 may transmit sixth information (for example,F31/F32)) to the electronic device 101 or the first external electronicdevice 102. F31 may refer to a final message sent by the second externalelectronic device 104 (for example, source address numeral “3”) inresponse to a message (for example, (F13,R13)) received from theelectronic device 101 (for example, destination address numeral “1”).F32 may refer to a final message sent by the second external electronicdevice 104 (for example, source address numeral “3”) in response to amessage (for example, (F23,R23)) received from the first externalelectronic device 102 (for example, destination address numeral “2”).The sixth information may include at least one of information regardingthe time at which the second external electronic device 104 received thefourth information, information regarding the time at which the secondexternal electronic device 104 received the fifth information, orinformation regarding the time at which the second external electronicdevice 104 transmitted the sixth information.

At the sixth time 711, the electronic device 101 may receive sixthinformation (for example, F31/F32)) from the second external electronicdevice 104, may read information only corresponding to the electronicdevice 101 (for example, F31), among the received sixth information, andmay store the read information in the memory 130. The electronic device101 may measure the distance from the second external electronic device104 based on at least one of the third information received at the thirdtime 705, the fourth information transmitted at the fourth time 707, orthe sixth information received at the sixth time 711. For example, theelectronic device 101 may obtain processing time information based onthe sixth information, and may measure the distance from the secondexternal electronic device 104 based on at least one of the obtainedprocessing time information, information regarding the time at which thethird information was received, information regarding the time at whichthe fourth information was transmitted, or information regarding thetime at which the sixth information was received.

Upon receiving the sixth information from the second external electronicdevice 104, the electronic device 101 may acquire AOA informationthrough multiple antennas and may identify the relative location of thesecond external electronic device 104 based on the acquired AOAinformation and the distance from the second external electronic device104.

At the sixth time 711, the first external electronic device 102 mayreceive sixth information (for example, F31/F32) from the secondexternal electronic device 104, may read information only correspondingto the first external electronic device 102 (for example, F32) among thereceived sixth information, and may store the read information in thememory 130. The first external electronic device 102 may measure thedistance from the second external electronic device 104 based on atleast one of the third information received at the third time 705, thefifth information transmitted at the fifth time 709, or the sixthinformation received at the sixth time 711. For example, the firstexternal electronic device 102 may obtain processing time informationbased on the sixth information, and may measure the distance from thesecond external electronic device 104 based on at least one of theobtained processing time information, information regarding the time atwhich the third information was received, information regarding the timeat which the fifth information was transmitted, or information regardingthe time at which the sixth information was received.

Upon receiving the sixth information from the second external electronicdevice 104, the first external electronic device 102 may acquire AOAinformation through multiple antennas and may identify the relativelocation of the second external electronic device 104 based on theacquired AOA information and the distance from the second externalelectronic device 104.

The electronic device 101 may store information regarding the time atwhich (N+1)^(th) information was transmitted at an (N+1)^(th) time. The(N+1)^(th) information may include information regarding the time atwhich respective pieces of last information previously transmitted byother external electronic devices were received. Additionally oralternatively, the last information may include processing timeinformation corresponding to the time at which previous information(i.e., last information) was processed by other external electronicdevices. If the second external electronic device 104 transmits a signalthrough an assigned time interval, the remaining electronic devicesreceive the same. The remaining electronic devices may identify thedistance from the second external electronic device 104 and the relativeangle thereof by using the signal sent by the second external electronicdevice 104, and this information enables each electronic device toidentify the relative location with the second external electronicdevice 104.

The total number of pieces of ranging information to be exchanged mayvary depending on the location measurement scheme (for example, SS-TWRor DS-TWR). For example, a comparison between FIG. 4A, in which threeelectronic devices measure locations according to the SS-TWR scheme, andFIG. 7A, in which three electronic devices measure locations accordingto the DS-TWR scheme, shows that the DS-TWR scheme uses one more slotthan the SS-TWR scheme. In addition, according to the DS-TWR measurementscheme, if N (for example, if N is 3 in FIG. 7A) electronic devicesparticipate in time scheduling, and if ranging information is exchangedthrough 2*N slots (for example, 6 slots in FIG. 7A), then the distanceand direction (for example, AOA) between respective electronic devicesmay be identified from the exchanged ranging information. N electronicdevices may all identify the relative locations with regard to eachother.

FIG. 7B illustrates an example in which an electronic device 101, thefirst external electronic device 102, the second external electronicdevice 104, and the third external electronic device 430, measure thelocation of each electronic device through UWB communication accordingto the DS-TWR scheme. FIG. 7B is different from FIG. 7A in that thereare three external electronic devices, and the remaining operations areidentical to those in FIG. 7A. Repeated descriptions will be shortenedwhen referring to FIG. 7B.

Referring to FIG. 7B, the electronic device 101 may identify an externalelectronic device positioned nearby through UWB communication or adifferent type of communication from the UWB (for example, Bluetooth™ orWi-Fi) at the request of the user, at the request of a connected server108, the first external electronic device 102, the second externalelectronic device 104, or the third external electronic device 430. Theelectronic device 101 may determine time scheduling information based onthe number of identified external electronic devices (for example,three) or the location measurement scheme (for example, DS-TWR scheme).The electronic device 101 may transmit the determined time scheduleinformation to the first external electronic device 102, the secondexternal electronic device 104, and the third external electronic device430. The first time 701, the second time 703, and the third time 705 areidentical or similar to those described with reference to FIG. 7A, anddetailed descriptions thereof will be omitted with reference to FIG. 7B.Numerals (for example, 12, 13, 14, 21, 23, 24) following English letters(for example, P, R, F) may refer to a source address used to transmitinformation and a destination address used to receive information. Theelectronic device 101 may correspond to numeral “1”, the first externalelectronic device 102 may correspond to numeral “2”, the second externalelectronic device 104 may correspond to numeral “3”, and the thirdexternal electronic device 430 may correspond to numeral “4”.

In FIG. 7B, according to the DS-TWR scheme, first informationtransmitted by the electronic device 101 at the first time 701 mayinclude information regarding the time at which the electronic device101 transmitted the first information. Second information transmitted bythe first external electronic device 102 at the second time 703 mayinclude information regarding the time at which the first externalelectronic device 102 transmitted the second information. Thirdinformation transmitted by the second external electronic device 104 atthe third time 705 may include information regarding the time at whichthe second external electronic device 104 transmitted the thirdinformation. Fourth information transmitted by the third externalelectronic device 430 at the fourth time 707 may include informationregarding the time at which the third external electronic device 430transmitted the fourth information. When a poll message or a responsemessage is sent according to the DS-TWR scheme, which is different fromthe SS-TWR scheme, the poll message or the response message may includeonly information regarding the time at which information (for example,first information, second information, third information, or fourthinformation) of the subject who sends information (for example, theelectronic device 101, the first external electronic device 102, thesecond external electronic device 104, or the third external electronicdevice 430) is sent. According to the DS-TWR scheme, when firstinformation to fourth information is transmitted (for example, when apoll message or a response message is transmitted), time informationreceived from a different device may not be included, and when fifthinformation to eighth information is sent (for example, when a finalmessage is transmitted), time information received from a differentdevice may be included.

At the fourth time 707, the third external electronic device 430 maytransmit fifth information (for example, (R41,P41)/(R42,P42)/(R43,P43))to the electronic device 101, the first external electronic device 102,or the second external electronic device 104. “(R41,P41)” may refer toboth a poll message (for example, P41) transmitted by the third externalelectronic device 430 (for example, source address numeral “4”) to theelectronic device 101 (for example, destination address numeral “1”) anda response message (for example, R41). “(R42,P42)” may refer to both apoll message (for example, P42) transmitted by the third externalelectronic device 430 (for example, source address numeral “4”) to thefirst external electronic device 102 (for example, destination addressnumeral “2”) and a response message (for example, R42). “(R43,P43)” mayrefer to both a poll message (for example, P43) transmitted by the thirdexternal electronic device 430 (for example, source address numeral “4”)to the second external electronic device 104 (for example, destinationaddress numeral “3”) and a response message (for example, R43).

The fourth information may include information regarding the time atwhich the third external electronic device 430 transmitted the fourthinformation.

At the fourth time 707, the electronic device 101 may receive fourthinformation (for example, (R41,P41)/(R42,P42)/(R43,P43)) from the thirdexternal electronic device 430, may read information only correspondingto the electronic device 101 (for example, (R41,P41)), among thereceived fourth information, and may store the read information in thememory 130. The electronic device 101 may store information regardingthe time at which the fourth information was received in the memory 130.At the fourth time 707, the first external electronic device 102 mayreceive fourth information (for example, (R41,P41)/(R42,P42)/(R43,P43))from the third external electronic device 430, may read information onlycorresponding to the first external electronic device 102 (for example,(R42,P42)), among the received fourth information, and may store theread information in the memory 130. The first external electronic device102 may store information regarding the time at which the fourthinformation was received in the memory 130. At the fourth time 707, thesecond external electronic device 104 may receive fourth information(for example, (R41,P41)/(R42,P42)/(R43,P43)) from the third externalelectronic device 430, may read information only corresponding to thesecond external electronic device 104 (for example, (R43,P43)), amongthe received fourth information, and may store the read information inthe memory 130. The second external electronic device 104 may storeinformation regarding the time at which the fourth information wasreceived in the memory 130.

At the fifth time 709, the electronic device 101 may transmit fifthinformation (for example, (F12,R12)/(F13,R13)/(F14,R14)) to the firstexternal electronic device 102, to the second external electronic device104, or to the third external electronic device 430. “(F12,R12)” mayrefer to both a final message (for example, F12) transmitted by theelectronic device 101 (for example, source address numeral “1”) to thefirst external electronic device 102 (for example, destination addressnumeral “2”) and a response message (for example, R12). “(F13,R13)” mayrefer to both a final message (for example, F13) transmitted by theelectronic device 101 (for example, source address numeral “1”) to thesecond external electronic device 104 (for example, destination addressnumeral “3”) and a response message (for example, R13), “(R14,R14)” mayrefer to both a final message (for example, F14) transmitted by theelectronic device 101 (for example, source address numeral “1”) to thethird external electronic device 430 (for example, destination addressnumeral “4”) and a response message (for example, R14).

The fifth information may include at least one of information regardingthe time at which the electronic device 101 transmitted the firstinformation, information regarding the time at which the electronicdevice 101 received the second information, information regarding thetime at which the electronic device 101 received the third information,information regarding the time at which the electronic device 101received the fourth information, or information regarding the time atwhich the electronic device 101 transmitted the fifth information.

At the fifth time 709, the first external electronic device 102 mayreceive fifth information (for example, (F12,R12)/(F13,R13)/(F14,R14))from the electronic device 101, may read information only correspondingto the first external electronic device 102 (for example, (F12,R12))among the received fifth information, and may store the read informationin the memory 130. At the fifth time 709, the first external electronicdevice 102 may measure the distance from the electronic device 101 basedon at least one of the first information received at the first time 701,the second information transmitted at the second time 703, or the fifthinformation received at the fifth time 709. For example, the firstexternal electronic device 102 may obtain information regarding theprocessing time of the electronic device 101 based on the fifthinformation, and may measure the distance from the electronic device 101based on at least one of the obtained processing time information,information regarding the time at which the first information wasreceived, information regarding the time at which the second informationwas transmitted, or information regarding the time at which the fifthinformation was received. Upon receiving the fifth information from theelectronic device 101, the first external electronic device 102 mayacquire AOA information through multiple antennas and may identify therelative location of the electronic device 101 based on the acquired AOAinformation and the distance from the electronic device 101.

At the fifth time 709, the second external electronic device 104 mayreceive fifth information (for example, (F12,R12)/(F13,R13)/(F14,R14))from the electronic device 101, may read information only correspondingto the second external electronic device 104 (for example, (F13,R13))among the received fifth information, and may store the read informationin the memory 130. At the fifth time 709, the second external electronicdevice 104 may measure the distance from the electronic device 101 basedon at least one of the first information received at the first time 701,the third information transmitted at the third time 705, or the fifthinformation received at the fifth time 709. For example, the secondexternal electronic device 104 may obtain information regarding theprocessing time of the electronic device 101 based on the fifthinformation, and may measure the distance from the electronic device 101based on at least one of the obtained processing time information,information regarding the time at which the first information wasreceived, information regarding the time at which the third informationwas transmitted, or information regarding the time at which the fifthinformation was received. Upon receiving the fifth information from theelectronic device 101, the second external electronic device 104 mayacquire AOA information through multiple antennas and may identify therelative location of the electronic device 101 based on the acquired AOAinformation and the distance from the electronic device 101.

At the fifth time 709, the third external electronic device 430 mayreceive fifth information (for example, (F12,R12)/(F13,R1)/(F14,R14))from the electronic device 101, may read information only correspondingto the third external electronic device 430 (for example, (F14,R14))among the received fifth information, and may store the read informationin the memory 130. At the fifth time 709, the third external electronicdevice 430 may measure the distance from the electronic device 101 basedon at least one of the first information received at the first time 701,the fourth information transmitted at the fourth time 707, or the fifthinformation received at the fifth time 709. For example, the thirdexternal electronic device 430 may obtain information regarding theprocessing time of the electronic device 101 based on the fifthinformation, and may measure the distance from the electronic device 101based on at least one of the obtained processing time information,information regarding the time at which the first information wasreceived, information regarding the time at which the fourth informationwas transmitted, or information regarding the time at which the fifthinformation was received. Upon receiving the fifth information from theelectronic device 101, the third external electronic device 430 mayacquire AOA information through multiple antennas and may identify therelative location of the electronic device 101 based on the acquired AOAinformation and the distance from the electronic device 101.

At the sixth time 711, the first external electronic device 102 maytransmit sixth information (for example, F21/(F23,R23)/(F24,R24)) to theelectronic device 101, the second external electronic device 104, andthe third external electronic device 430. F21 may refer to a finalmessage transmitted by the first external electronic device 102 (forexample, source address numeral “2”) to the electronic device 101 (forexample, destination address numeral “1”). (F23,R23) may refer to both afinal message (for example, F23) transmitted by the first externalelectronic device 102 (for example, source address numeral “2”) to thesecond external electronic device 104 (for example, destination addressnumeral “3”) and a response message (for example, R23). (F24,R24) mayrefer to both a final message (for example, F24) transmitted by thefirst external electronic device 102 (for example, source addressnumeral “2”) to the third external electronic device 430 (for example,destination address numeral “4”) and a response message (for example,R24).

The sixth information may include at least one of information regardingthe time at which the first external electronic device 102 transmittedthe second information, information regarding the time at which thefirst external electronic device 102 received the third information,information regarding the time at which the first external electronicdevice 102 received the fourth information, information regarding thetime at which the first external electronic device 102 received thefifth information, or information regarding the time at which the firstexternal electronic device 102 transmitted the sixth information.

At the sixth time 711, the electronic device 101 may receive sixthinformation (for example, F21/(F23,R23)/(F24,R24)) from the firstexternal electronic device 102, may read information only correspondingto the electronic device 101 (for example, F21) among the received sixthinformation, and may store the read information in the memory 130. Atthe sixth time 711, the electronic device 101 may measure the distancefrom the first external electronic device 102 based on at least one ofthe second information received at the second time 703, the fifthinformation transmitted at the fifth time 709, or the sixth informationreceived at the sixth time 711. For example, the electronic device 101may obtain information regarding the processing time of the firstexternal electronic device 102 based on the sixth information, and maymeasure the distance from the first external electronic device 102 basedon at least one of the obtained processing time information, informationregarding the time at which the second information was received,information regarding the time at which the fifth information wastransmitted, or information regarding the time at which the sixthinformation was received.

Upon receiving the sixth information from the first external electronicdevice 102, the electronic device 101 may acquire AOA informationthrough multiple antennas and may identify the relative location of thefirst external electronic device 102 based on the acquired AOAinformation and the distance from the first external electronic device102.

At the sixth time 711, the second external electronic device 104 mayreceive sixth information (for example, F21/(F23,R23)/(F24,R24))) fromthe first external electronic device 102, may read information onlycorresponding to the second external electronic device 104 (for example,(F23,R23)) among the received sixth information, and may store the readinformation in the memory 130. At the sixth time 711, the secondexternal electronic device 104 may measure the distance from the firstexternal electronic device 102 based on at least one of the secondinformation received at the second time 703, the third informationtransmitted at the third time 705, or the sixth information received atthe sixth time 711. For example, the second external electronic device104 may obtain information regarding the processing time of the firstexternal electronic device 102 based on the sixth information, and maymeasure the distance from the first external electronic device 102 basedon at least one of the obtained processing time information, informationregarding the time at which the second information was received,information regarding the time at which the third information wastransmitted, or information regarding the time at which the sixthinformation was received.

Upon receiving the sixth information from the first external electronicdevice 102, the second external electronic device 104 may acquire AOAinformation through multiple antennas and may identify the relativelocation of the first external electronic device 102 based on theacquired AOA information and the distance from the first externalelectronic device 102.

At the sixth time 711, the third external electronic device 430 mayreceive sixth information (for example, F21/(F23,R23)/(F24,R24)) fromthe first external electronic device 102, may read information onlycorresponding to the third external electronic device 430 (for example,(F24,R24)) among the received sixth information, and may store the readinformation in the memory 130. At the sixth time 711, the third externalelectronic device 430 may measure the distance from the first externalelectronic device 102 based on at least one of the second informationreceived at the second time 703, the fourth information transmitted atthe fourth time 707, or the sixth information received at the sixth time711. For example, the third external electronic device 430 may obtaininformation regarding the processing time of the first externalelectronic device 102 based on the sixth information, and may measurethe distance from the first external electronic device 102 based on atleast one of the obtained processing time information, informationregarding the time at which the second information was received,information regarding the time at which the fourth information wastransmitted, or information regarding the time at which the sixthinformation was received.

Upon receiving the sixth information from the first external electronicdevice 102, the third external electronic device 430 may acquire AOAinformation through multiple antennas and may identify the relativelocation of the first external electronic device 102 based on theacquired AOA information and the distance from the first externalelectronic device 102.

At the seventh time 713, the second external electronic device 104 maytransmit seventh information (for example, F31/F32/(F34,R34)) to theelectronic device 101, the first external electronic device 102, and thethird external electronic device 430. F31 may refer to a final messagetransmitted by the second external electronic device 104 (for example,source address numeral “3”) to the electronic device 101 (for example,destination address numeral “1”). F32 may refer to a final messagetransmitted by the second external electronic device 104 (for example,source address numeral “3”) to the first external electronic device 102(for example, destination address numeral “2”). (F34,R34) may refer toboth a final message (for example, F34) transmitted by the secondexternal electronic device 104 (for example, source address numeral “3”)to the third external electronic device 430 (for example, destinationaddress numeral “4”) and a response message (for example, R34)

For example, the seventh information may include at least one ofinformation regarding the time at which the second external electronicdevice 104 transmitted the third information, information regarding thetime at which the second external electronic device 104 received thefourth information, information regarding the time at which the secondexternal electronic device 104 received the fifth information,information regarding the time at which the second external electronicdevice 104 received the sixth information, or information regarding thetime at which the second external electronic device 104 transmitted theseventh information.

At the seventh time 713, the electronic device 101 may receive seventhinformation (for example, F31/F32/(F34,R34)) from the second externalelectronic device 104, may read information only corresponding to theelectronic device 101 (for example, F31) among the received seventhinformation, and may store the read information in the memory 130. Atthe seventh time 713, the electronic device 101 may measure the distancefrom the second external electronic device 104 based on at least one ofthe third information received at the third time 705, the fifthinformation transmitted at the fifth time 709, or the seventhinformation received at the seventh time 713. For example, theelectronic device 101 may obtain information regarding the processingtime of the second external electronic device 104 based on the seventhinformation, and may measure the distance from the second externalelectronic device 104 based on at least one of the obtained processingtime information, information regarding the time at which the thirdinformation was received, information regarding the time at which thefifth information was transmitted, or information regarding the time atwhich the seventh information was received.

Upon receiving the seventh information from the second externalelectronic device 104, the electronic device 101 may acquire AOAinformation through multiple antennas and may identify the relativelocation of the second external electronic device 104 based on theacquired AOA information and the distance from the second externalelectronic device 104.

At the seventh time 713, the first external electronic device 102 mayreceive seventh information (for example, F31/F32/(F34,R34)) from thesecond external electronic device 104, may read information onlycorresponding to the first external electronic device 102 (for example,F32) among the received seventh information, and may store the readinformation in the memory 130. At the seventh time 713, the firstexternal electronic device 102 may measure the distance from the secondexternal electronic device 104 based on at least one of the thirdinformation received at the third time 705, the sixth informationtransmitted at the sixth time 711, or the seventh information receivedat the seventh time 713. For example, the first external electronicdevice 102 may obtain information regarding the processing time of thesecond external electronic device 104 based on the seventh information,and may measure the distance from the second external electronic device104 based on at least one of the obtained processing time information,information regarding the time at which the third information wasreceived, information regarding the time at which the sixth informationwas transmitted, or information regarding the time at which the seventhinformation was received.

Upon receiving the seventh information from the second externalelectronic device 104, the first external electronic device 102 mayacquire AOA information through multiple antennas and may identify therelative location of the second external electronic device 104 based onthe acquired AOA information and the distance from the second externalelectronic device 104.

At the seventh time 713, the third external electronic device 430 mayreceive seventh information (for example, F31/F32/(F34,R34)) from thesecond external electronic device 104, may read information onlycorresponding to the third external electronic device 430 (for example,(F34,R34)) among the received seventh information, and may store theread information in the memory 130. At the seventh time 713, the thirdexternal electronic device 430 may measure the distance from the secondexternal electronic device 104 based on at least one of the thirdinformation received at the third time 705, the fourth informationtransmitted at the fourth time 707, or the seventh information receivedat the seventh time 713. For example, the third external electronicdevice 430 may obtain information regarding the processing time of thesecond external electronic device 104 based on the seventh information,and may measure the distance from the second external electronic device104 based on at least one of the obtained processing time information,information regarding the time at which the third information wasreceived, information regarding the time at which the fourth informationwas transmitted, or information regarding the time at which the seventhinformation was received.

Upon receiving the seventh information from the second externalelectronic device 104, the third external electronic device 430 mayacquire AOA information through multiple antennas and may identify therelative location of the second external electronic device 104 based onthe acquired AOA information and the distance from the second externalelectronic device 104.

At the eighth time 715, the third external electronic device 430 maytransmit eighth information (for example, F41/F42/F43) to the electronicdevice 101, the first external electronic device 102, and the secondexternal electronic device 104. F41 may refer to a final messagetransmitted by the third external electronic device 430 (for example,source address numeral “4”) to the electronic device 101 (for example,destination address numeral “1”). F42 may refer to a final messagetransmitted by the third external electronic device 430 (for example,source address numeral “4”) to the first external electronic device 102(for example, destination address numeral “2”). F43 may refer to a finalmessage transmitted by the third external electronic device 430 (forexample, source address numeral “4”) to the second external electronicdevice 104 (for example, destination address numeral “3”).

For example, the eighth information may include at least one ofinformation regarding the time at which the third external electronicdevice 430 transmitted the fourth information, information regarding thetime at which the third external electronic device 430 received thefifth information, information regarding the time at which the thirdexternal electronic device 430 received the sixth information,information regarding the time at which the third external electronicdevice 430 received the seventh information, or information regardingthe time at which the third external electronic device 430 transmittedthe eighth information.

At the eighth time 715, the electronic device 101 may receive eighthinformation (for example, F41/F42/F43) from the third externalelectronic device 430, may read information only corresponding to theelectronic device 101 (for example, F41), among the received eighthinformation, and may store the read information in the memory 130. Atthe eighth time 715, the electronic device 101 may measure the distancefrom the third external electronic device 430 based on at least one ofthe fourth information received at the fourth time 707, the fifthinformation transmitted at the fifth time 709, or the eighth informationreceived at the eighth time 715. For example, the electronic device 101may obtain information regarding the processing time of the thirdexternal electronic device 430 based on the eighth information, and maymeasure the distance from the third external electronic device 430 basedon at least one of the obtained processing time information, informationregarding the time at which the fourth information was received,information regarding the time at which the fifth information wastransmitted, or information regarding the time at which the eighthinformation was received.

Upon receiving the seventh information from the third externalelectronic device 430, the electronic device 101 may acquire AOAinformation through multiple antennas and may identify the relativelocation of the third external electronic device 430 based on theacquired AOA information and the distance from the third externalelectronic device 430.

At the eighth time 715, the first external electronic device 102 mayreceive seventh information (for example, F41/F42/F43) from the thirdexternal electronic device 430, may read information only correspondingto the first external electronic device 102 (for example, F42), amongthe received eighth information, and may store the read information inthe memory 130. At the eighth time 715, the first external electronicdevice 102 may measure the distance from the third external electronicdevice 430 based on at least one of the fourth information received atthe fourth time 705, the sixth information transmitted at the sixth time711, or the eighth information received at the eighth time 715. Forexample, the first external electronic device 102 may obtain informationregarding the processing time of the third external electronic device430 based on the eighth information, and may measure the distance fromthe third external electronic device 430 based on at least one of theobtained processing time information, information regarding the time atwhich the fourth information was received, information regarding thetime at which the sixth information was transmitted, or informationregarding the time at which the eighth information was received.

Upon receiving the eighth information from the third external electronicdevice 430, the first external electronic device 102 may acquire AOAinformation through multiple antennas and may identify the relativelocation of the third external electronic device 430 based on theacquired AOA information and the distance from the third externalelectronic device 430.

At the eighth time 715, the second external electronic device 104 mayreceive eighth information (for example, F41/F42/F43) from the thirdexternal electronic device 430, may read information only correspondingto the second external electronic device 104 (for example, F43), amongthe received eighth information, and may store the read information inthe memory 130. At the eighth time 715, the second external electronicdevice 104 may measure the distance from the third external electronicdevice 430 based on at least one of the fourth information received atthe fourth time 707, the seventh information transmitted at the seventhtime 713, or the eighth information received at the eighth time 715. Forexample, the second external electronic device 104 may obtaininformation regarding the processing time of the third externalelectronic device 430 based on the eighth information, and may measurethe distance from the third external electronic device 430 based on atleast one of the obtained processing time information, informationregarding the time at which the fourth information was received,information regarding the time at which the seventh information wastransmitted, or information regarding the time at which the eighthinformation was received.

Upon receiving the eighth information from the third external electronicdevice 430, the second external electronic device 104 may acquire AOAinformation through multiple antennas and may identify the relativelocation of the third external electronic device 430 based on theacquired AOA information and the distance from the third externalelectronic device 430.

FIG. 7C illustrates exemplary information transmitted based on theDS-TWR scheme, according to an embodiment. FIG. 7D illustrates exemplaryinformation transmitted based on the DS-TWR scheme, according to anembodiment. FIG. 7E illustrates exemplary information transmitted basedon the DS-TWR scheme, according to an embodiment.

FIG. 7C illustrates packets including time information. As illustratedin FIG. 7C, various types of packet configurations may be implemented byusing packets that may be provided by default.

Referring to FIG. 7C, when the electronic device 101 or the firstexternal electronic device 102 follows the MAC frame format of 802.15.4,the source address and the source PAN ID may be implemented in the MHR.The following description, with respect to FIG. 7C, may be directed tospecifying payload fields of packets. First information 740 transmittedby the electronic device 101 at the first time 701 in FIG. 7A mayinclude at least one of a source address 741, a message type 743, timeinformation 745, a first destination address 747, or a seconddestination address 749. The source address 741 may an identifierassigned to the electronic device 101 101 that transmitted the firstinformation 740, and may be “1”, for example. The message type 743 mayrefer to a message type to which the first information corresponds and,since a poll message, a response message, or a final message isexchanged according to the DS-TWR scheme, the message type 743 may beone of a poll message, a response message, or a final message.

The message type 743 of the first information 740 is initially sent bythe electronic device 101 and thus may correspond to a poll message. ThetxTime 745 may indicate the time at which the electronic device 101transmits the first information 740. The first destination address 747is an identifier assigned to the first external electronic device 102that receives the first information 740 and may be “2”, for example. Thesecond destination address 749 is an identifier assigned to the secondexternal electronic device 104 that receives the first information 740and may be “3”, for example.

At the first time 701, the first external electronic device 102 mayreceive the first information 740 and may identify, based on the sourceaddress 741, that the first information 740 was transmitted from theelectronic device 101, may identify that the message type 743corresponds to a poll message, and may identify, based on the firstdestination address 747, that the first information 740 was sent to thefirst external electronic device 102. The first external electronicdevice 102 may store the time information 745 included in the firstinformation 740, or information regarding the time at which the firstinformation 740 was received, in the memory 130.

In addition, at the first time 701, the second external electronicdevice 104 may receive the first information 740 and may identify, basedon the source address 741, that the first information 740 wastransmitted from the electronic device 101, may identify that themessage type 743 corresponds to a poll message, and may identify, basedon the second destination address 749, that the first information 740was sent to the second external electronic device 104. The secondexternal electronic device 104 may store the time information 745included in the first information 740, or information regarding the timeat which the first information 740 was received, in the memory 130.

At the second time 703, the first external electronic device 102 maytransmit second information 750. The second information 750 may includeinformation 751 corresponding to a poll message and information 755corresponding to a response message. The information 751 correspondingto a poll message may indicate that the second information 750 was sentby the first external electronic device 102 (for example, SOUR is “2”),and that the message type corresponds to a poll message (for example,TYPE is “poll”); may include information 753 regarding the time at whichthe first external electronic device 102 transmitted the secondinformation 750; and may indicate that the second information 750 wastransmitted to the electronic device 101 (for example, DEST is “1”) orto the second external electronic device 104 (for example, DEST is “3”).The information 755 corresponding to a response message may indicatethat the message type corresponds to a response message (for example,TYPE is “RESP”), and the device to receive the response message is theelectronic device 101 (for example, DEST is “1”).

At the second time 703, the electronic device 101 may receive the secondinformation 750 and may store the time information 753 included in thesecond information 750, or information regarding the time at which thesecond information 750 was received, in the memory 130. At the secondtime 703, the second external electronic device 104 may receive thesecond information 750 and may store the time information 753 includedin the second information 750, or information regarding the time atwhich the second information 750 was received, in the memory 130.

The fourth information 760 transmitted by the electronic device 101 atthe fourth time 707 may include information 761 corresponding to aresponse message and information 762 corresponding to a final message.The information 761 corresponding to a response message may indicatethat the fourth information 760 was sent by the electronic device 101(for example, SOUR is “1”), that the message type corresponds to aresponse message (for example, TYPE is “RESP”), and that the destinationaddress of the response message corresponds to the first externalelectronic device 102 (for example, DEST is “2”) or the second externalelectronic device 104 (for example, DEST is “3”). The information 762corresponding to a final message may include a message type 763, firsttime information 764, a first destination address 765, second timeinformation 767, a second destination address 768, or third timeinformation 769. The message type 763 may indicate that the message typecorresponds to a final message (for example, TYPE is “FINAL”).

The first time information 764 may include a time at which theelectronic device 101 transmits the fourth information 760. The firstdestination address 765 may include an identifier (for example, “2”) ofthe first external electronic device 102 which is supposed to receivethe information 762 corresponding to a final message. The second timeinformation 767 may include a time at which the electronic device 101received the second information 740. The second destination address 768may include an identifier (for example, “3”) of the second externalelectronic device 104 which is supposed to receive the information 762corresponding to a final message. The third time information 769 mayinclude a time at which the electronic device 101 received the thirdinformation.

At the fourth time 707, the first external electronic device 102 mayreceive the fourth information 760 and may store the first timeinformation 764 or the second time information 767 included in thefourth information 760, or information regarding the time at which thefourth information 760 was received, in the memory 130. The firstexternal electronic device 102 may obtain information regarding theprocessing time of the electronic device 101 based on the first timeinformation 764 or the second time information 767. The first externalelectronic device 102 may measure the distance from the electronicdevice 101 based on at least one of the obtained information regardingthe processing time of the electronic device 101, information regardingthe time at which the first information 740 was received, informationregarding the time at which the second information 750 was transmitted,or information regarding the time at which the fourth information 760was received.

At the fourth time 707, the second external electronic device 104 mayreceive the fourth information 760 and may store the first timeinformation 764 or the second time information 767 included in thefourth information 760, or information regarding the time at which thefourth information 760 was received, in the memory 130. The secondexternal electronic device 104 may obtain information regarding theprocessing time of the electronic device 101 based on the first timeinformation 764 or the second time information 767. The second externalelectronic device 104 may measure the distance from the electronicdevice 101 based on at least one of the obtained information regardingthe processing time of the electronic device 101, information regardingthe time at which the first information 740 was received, informationregarding the time at which the third information was transmitted, orinformation regarding the time at which the fourth information 760 wasreceived.

FIG. 7D illustrates packets including time information in a finalmessage, according to an embodiment.

Referring to FIG. 7D, the electronic device 101 and/or the firstexternal electronic device 102 may not send time information whensending a poll message, and may transmit all pieces of time informationincluded, when only sending a final message. In this case, firstinformation 770 transmitted by the electronic device 101 at the firsttime 701 may include at least one of a source address (for example, SOUR“1”), a message type (for example, TYPE is “POLL”), a first destinationaddress (for example, DEST “2”), or a second destination address (forexample, DEST “3”). At the first time 701, the first external electronicdevice 102 may receive the first information 770 and may storeinformation regarding the time at which the first information 770 wasreceived, in the memory 130. At the first time 701, the second externalelectronic device 104 may receive the first information 770 and maystore information regarding the time at which the first information 770was received, in the memory 130.

At the second time 703, the first external electronic device 102 maytransmit second information 775. The second information 775 may includeinformation 777 corresponding to a poll message and information 778corresponding to a response message. The information 777 correspondingto a poll message may indicate that the second information 775 was sentby the first external electronic device 102 (for example, SOUR is “2”),that the message type corresponds to a poll message (for example, TYPEis “poll”), and that the same was transmitted to the electronic device101 (for example, DEST is “1”) or to the second external electronicdevice 104 (for example, DEST is “3”). The information 778 correspondingto a response message may indicate that the message type corresponds toa response message (for example, TYPE is “RESP”), and the device toreceive the response message is the electronic device 101 (for example,DEST is “1”).

The fourth information 780 transmitted by be electronic device 101 atthe fourth time 707 may include information 781 corresponding to aresponse message and information 782 corresponding to a final message.The information 781 corresponding to a response message may indicatethat the fourth information 780 was sent by the electronic device 101(for example, SOUR is “1”), that the message type corresponds to aresponse message (for example, TYPE is “RESP”), and that the destinationaddress of the response message corresponds to the first externalelectronic device 102 (for example, DEST is “2”) or the second externalelectronic device 104 (for example, DEST is “3”). The information 782corresponding to a final message may include a message type 783, firsttime information 784, second time information 785, a first destinationaddress 786, third time information 787, a second destination address788, or fourth time information 789.

The message type 783 may indicate that the message type corresponds to afinal message (for example, TYPE is “FINAL”). The first time information784 may include a time at which the electronic device 101 transmittedthe first information 770, and the second time information 785 mayinclude a time at which the electronic device 101 transmitted the fourthinformation 780. The first destination address 786 may include anidentifier (for example, “2”) of the first external electronic device102 which is supposed to receive the information 782 corresponding to afinal message. The third time information 787 may include a time atwhich the electronic device 101 received the second information 775. Thesecond destination address 788 may include an identifier (for example,“3”) of the second external electronic device 104 which is supposed toreceive the information 782 corresponding to a final message. The fourthtime information 789 may include a time at which the electronic device101 received the third information.

At the fourth time 707, the first external electronic device 102 mayreceive the fourth information 760 and may measure the distance from theelectronic device 101 according to Equation (2) below:Distance=((time at which second information was received−time at whichfirst information was transmitted)−(time at which second information wastransmitted−time at which first information was received)+(time at whichfourth information was received−time at which second information wastransmitted)−(time at which fourth information was transmitted−time atwhich second information was received))/4*speed of light  Equation (2)

FIG. 7E illustrates packets that are broadcast, according to anembodiment.

Referring to FIG. 7E, prior to transmitting information according to theDS-TWR scheme, the electronic device 101 (for example, the masterelectronic device) may transmit time schedule information to a firstexternal electronic device 102 and a second external electronic device104 (for example, slave electronic devices). The time scheduleinformation configures a device to transmit information at each timesuch that each electronic device can transmit information only at a timeassigned thereto and cannot transmit information outside the timeassigned thereto. In addition, since each electronic device transmits orreceives information based on the time schedule information, the samecan be aware of which electronic device (for example, source address)transmitted information at each time, which electronic device (forexample, destination address) is to receive information, and what typeof message is to be received. Therefore, each electronic device may havea broadcast-type packet configuration.

At the first time 701, the electronic device 101 may transmit firstinformation 790. The electronic device 101 may transmit the firstinformation 790 as a type of packet having no payload field. The firstinformation 790 may include a source address (for example, SOUR “1”).Upon receiving the first information 790 at the first time 701, thefirst external electronic device 102 may store information regarding thetime at which the first information 790 was received in the memory 130.Upon receiving the first information 790 at the first time 701, thesecond external electronic device 104 may store information regardingthe time at which the first information 790 was received in the memory130.

At the second time 703, the first external electronic device 102 maytransmit second information 793. The second information 793 may includea source address (for example, SOUR “2”). Upon receiving the secondinformation 793 at the second time 703, the electronic device 101 maystore information regarding the time at which the second information 793was received in the memory 130. Upon receiving the second information793 at the second time 703, the second external electronic device 104may store information regarding the time at which the second information793 was received in the memory 130.

The fourth information 795 transmitted by the electronic device 101 atthe fourth time 707 may include a source address (for example, SOUR“2”), first time information 784, second time information 785, a firstdestination address 786, third time information 787, a seconddestination address 788, or fourth time information 789. The first timeinformation 784 may include a time at which the electronic device 101transmitted the first information 770, and the second time information785 may include a time at which the electronic device 101 transmittedthe fourth information 780. The first destination address 786 mayinclude an identifier (for example, “2”) of the first externalelectronic device 102 which is supposed to receive the information 782corresponding to a final message. The third time information 787 mayinclude a time at which the electronic device 101 received the secondinformation 775. The second destination address 788 may include anidentifier (for example, “3”) of the second external electronic device104 which is supposed to receive the information 782 corresponding to afinal message. The fourth time information 789 may include a time atwhich the electronic device 101 received the third information.

At the fourth time 707, the first external electronic device 102 mayreceive the fourth information 760 and may measure the distance from theelectronic device 101 according to Equation (2). At the fourth time 707,the second external electronic device 104 may receive the fourthinformation 760 and may measure the distance from the electronic device101 according to Equation (2).

The fifth information 720 transmitted by the first external electronicdevice 102 at the fifth time 709 may include a source address (forexample, SOUR “2”), first time information 721, second time information722, a first destination address 723, third time information 724, asecond destination address 725, or fourth time information 726. Thefirst time information 721 may include a time at which the firstexternal electronic device 102 transmitted the second information 793,and the second time information 722 may include a time at which thefirst external electronic device 102 transmitted the fifth information720. The first destination address 723 may include an identifier (forexample, “1”) of the electronic device 101 which is supposed to receivethe information 720. The third time information 724 may include a timeat which the first external electronic device 102 received the firstinformation 790. The second destination address 725 may include anidentifier (for example, “3”) of the second external electronic device104 which is supposed to receive the information 720. The fourth timeinformation 726 may include a time at which the first externalelectronic device 102 received the third information.

At the fifth time 709, the electronic device 101 may receive the fifthinformation 720 and may store the first time information 721, the secondtime information 722, the third time information 724 included in thefifth information 720, or information regarding the time at which thefifth information 720 was received, in the memory 130. The electronicdevice 101 may obtain information regarding the processing time of theelectronic device 101 based on at least one of the first timeinformation 721, the second time information 722, or the third timeinformation 724. The electronic device 101 may measure the distance fromthe first external electronic device 102 based on at least one of theobtained information regarding the processing time of the electronicdevice 101, information regarding the time at which the secondinformation 793 was received, information regarding the time at whichthe fourth information 795 was transmitted, or information regarding thetime at which the fifth information 720 was received.

At the fifth time 709, the second external electronic device 104 mayreceive the fifth information 720 and may store the first timeinformation 764, the second time information 767, the third timeinformation 726 included in the fifth information 720, or informationregarding the time at which the fourth information 760 was received, inthe memory 130. The second external electronic device 104 may obtaininformation regarding the processing time of the electronic device 101based on at least one of the first time information 764, the second timeinformation 767, or the third time information 726. The second externalelectronic device 104 may measure the distance from the first externalelectronic device 102 based on at least one of the obtained informationregarding the processing time of the electronic device 101, informationregarding the time at which the second information 793 was received,information regarding the time at which the third information wastransmitted, or information regarding the time at which the fifthinformation 720 was received.

FIG. 8 is a flowchart 800 illustrating a method for operating a masterelectronic device based on the DS-TWR, scheme, according to anembodiment,

FIG. 8 describes a method wherein an electronic device 101 operates as amaster electronic device. FIG. 8 illustrates location measurementoperations according to the DS-TWR scheme, which may be identical orsimilar to those in FIG. 5. When referring to FIG. 8, descriptionsoverlapping those in FIG. 5 may be shortened.

Referring to FIG. 8, in step 801, the processor 120 of the electronicdevice 101 identifies an external electronic device (for example, thefirst external electronic device 102, the second external electronicdevice 104, or the third external electronic device 430 in FIG. 7A orFIG. 7B) through a communication module 190. The processor 120 mayidentify external electronic devices by using a first type ofcommunication (for example, UWB) or a second type of communication (forexample, Bluetooth™ or Wi-Fi). Alternatively, the processor 120 mayidentify external electronic devices through a server 108 to which theelectronic device 101 is currently connected. Additionally oralternatively, the processor 120 may identify external electronicdevices if a designated condition is satisfied. Step 801 may beidentical or similar to step 501 in FIG. 5.

In step 803, the processor 120 receives a distance (or a location)measurement request. For example, the processor 120 may transmit amessage (or data) to the identified external electronic devices so as toidentify whether or not they will participate in distance measurement,and may identify (or determine) that the distance measurement requesthas been made if a response message is received in response to thetransmitted message. For example, the processor 120 may transmit thedistance measurement participation identification message periodicallyor selectively (for example, at the user's request). Additionally oralternatively, the processor 120 may receive a request for measuring thedistance from the external electronic devices from the user through aninput device 150. In addition, the processor 120 may identify that thereis a distance measurement request if an application (for example, gameapplication) that uses the distance from external electronic devices isexecuted. Step 803 may be identical or similar to step 503 in FIG. 5.

In step 805, the processor 120 determines time schedule information. Theprocessor 120 may determine the time schedule information based on alocation measurement scheme or the number of external electronic devicesthat transmitted response messages in response to the distancemeasurement request. It may be assumed in the description of operationsin HG. 8 that the electronic device 101, the first external electronicdevice 102 and the second external electronic device 104 measurelocations according to the DS-TWR scheme as in FIG. 7A. The processor120 may determine a master electronic device (for example, electronicdevice 101) as the device to which information is to be transmittedfirst, and may determine the external electronic devices as devices towhich information is to be transmitted at the remaining times. Forexample, according to the DS-TWR scheme, it is only after a responsemessage is transmitted in connection with a poll message, and a finalmessage is received, that the distance from a different electronicdevice can be measured. Step 805 may be identical or similar to step 505in FIG. 5.

In step 807, the processor 120 transmits the determined time scheduleinformation to the external electronic devices. The processor 120 maytransmit the determined time schedule information as a broadcast typecommunication, or may transmit the determined time schedule informationto external electronic devices that responded to the distancemeasurement request. The processor 120 may transmit the determined timeschedule information to the external electronic devices through thefirst type of communication or the second type of communication. Theprocessor 120 may transmit the determined time schedule information tothe external electronic devices through the server 108. Step 807 may beidentical or similar to step 507 in FIG. 5.

In step 809, the processor 120 transmits first information (orsignal/data) at a first time (for example, SLOT 1 701 in FIG. 7A). Theprocessor 120 may identify (or confirm) the time when information can betransmitted, based on the time schedule information, and may transmitthe first information at the first time. The first information (forexample, P12/P13 in FIG. 7A) may include the identifier of theelectronic device 101 (for example, source address “1”) or informationregarding the time at which the electronic device 101 transmitted thefirst information. The first information may be transmitted as abroadcast type communication or transmitted while the destinationaddress (for example, destination addresses “2” and “3”) is configuredtherein. The first information may be transmitted to the first externalelectronic device 102 and the second external electronic device 104. Theprocessor 120 may store information regarding the time at which thefirst information was transmitted in the memory 130. After receiving thefirst information, the first external electronic device 102 and thesecond external electronic device 104 may store information regardingthe time at which the first information was received.

In step 811, the processor 120 receives second information (for example,(R21,P21)/P23 in FIG. 7A) at a second time (for example, SLOT 2 703 inFIG. 7A) and may store the second information in the memory 130. Theprocessor 120 may read information only corresponding to the electronicdevice 101 (for example, (R21,P21)) among the received secondinformation, and store the read information in the memory 130. Theprocessor 120 may store information regarding the time at which thesecond information was received in the memory 130, or may read timeinformation included in the second information and may store the same inthe memory 130. Upon receiving the second information, the secondexternal electronic device 104 may store information regarding the timeat which the second information was received. The second information mayinclude information regarding the time at which the first externalelectronic device 102 received the first information, or informationregarding the time at which the first external electronic device 102transmitted the second information.

In step 813, the processor 120 receives third information (for example,(R31,P31)/(R32,P32) in FIG. 7A) at a third time (for example, SLOT 3 705in FIG. 7A), and may store the third information in the memory 130. Theprocessor 120 may read information only corresponding to the electronicdevice 101 (for example, (R31,P31)) among the received thirdinformation, and store the read information in the memory 130. Theprocessor 120 may store information regarding the time at which thethird information was received in the memory 130, or may read timeinformation included in the third information and may store the readinformation in the memory 130. For example, the third information mayinclude at least one of information regarding the time at which thesecond external electronic device 104 received the first information,information regarding the time at which the second external electronicdevice 104 received the second information, or information regarding thetime at which the second external electronic device 104 transmitted thethird information.

In step 815, the processor 120 transmits fourth information (forexample, (P12,R12)/(P13,R13) in FIG. 7A) at a fourth time (for example,SLOT 4 707 in FIG. 7A). The fourth information may include at least oneof information regarding the time at which the electronic device 101received the second information, information regarding the time at whichthe electronic device 101 received the third information, or informationregarding the time at which the electronic device 101 transmitted thefourth information.

Upon receiving the fourth information at the fourth time 707, the firstexternal electronic device 102 may read information only correspondingto the first external electronic device 102 (for example, (F12,R12))among the received fourth information, may store the read information inthe memory 130, and may store information regarding the time at whichthe fourth information was received. The first external electronicdevice 102 may measure the distance from the electronic device 101 basedon at least one of the first information received at the first time 701,the second information transmitted at the second time 703, or the fourthinformation received at the fourth time 707. At the fourth time 707, thesecond external electronic device 104 may read information onlycorresponds to the second external electronic device 104 (for example,(F13,R13)) among the received fourth information, may store the readinformation in the memory 130, and may store information regarding thetime at which the fourth information was received. The second externalelectronic device 104 may measure the distance from the electronicdevice 101 based on at least one of the first information received atthe first time 701, the third information transmitted at the third time705, or the fourth information received at the fourth time 707.

In step 817, the processor 120 receives fifth information (for example,F21/(F23,R23) in FIG. 7A) at a fifth time (for example, SLOT 5 709 inFIG. 7A), and determines (or measures) the distance from the firstexternal electronic device 102. The processor 120 may read informationonly corresponding to the electronic device 101 (for example, F21) amongthe received fifth information, and may store the read information inthe memory 130. The fifth information may include at least one ofinformation regarding the time at which the first external electronicdevice 102 received the third information, information regarding thetime at which the first external electronic device 102 received thefourth information, or information regarding the time at which the firstexternal electronic device 102 transmitted the fifth information. Theprocessor 120 may measure the distance from the first externalelectronic device 102 based on at least one of the second informationreceived at the second time 703, the fourth information transmitted atthe fourth time 707, or the fifth information received at the fifth time709.

At the fifth time 709, the second external electronic device 104 mayreceive fifth information (for example, F21/(F23,R23)) from the firstexternal electronic device 102, may read information only correspondingto the second external electronic device 104 (for example, (F23,R23))among the received fifth information, and may store the read informationin the memory 130. The second external electronic device 104 may measurethe distance from the first external electronic device 102 based on atleast one of the second information received at the second time 703, thethird information transmitted at the third time 705, or the fifthinformation received at the fifth time 709.

In step 819, the processor 120 receives sixth information (for example,F1/F32 in FIG. 7A) at a sixth time (for example, SLOT 4 711 in FIG. 7A),and determines the distance from the second external electronic device104. The sixth information may include at least one of informationregarding the time at which the second external electronic device 104received the fourth information, information regarding the time at whichthe second external electronic device 104 received the fifthinformation, or information regarding the time at which the secondexternal electronic device 104 transmitted the sixth information. Theprocessor 120 may read information only corresponding to the electronicdevice 101 (for example, F31), among the received sixth information, andmay store the read information in the memory 130. The processor 120 maymeasure the distance from the second external electronic device 104based on at least one of the third information received at the thirdtime 705, the fourth information transmitted at the fourth time 707, orthe sixth information received at the sixth time 711.

At the sixth time 711, the first external electronic device 102 mayreceive sixth information (for example, F31/F32) from the secondexternal electronic device 104, may read information only correspondingto the first external electronic device 102 (for example, F32) among thereceived sixth information, and may store the read information in thememory 130. The first external electronic device 102 may measure thedistance from the second external electronic device 104 based on atleast one of the third information received at the third time 705, thefifth information transmitted at the fifth time 709, or the sixthinformation received at the sixth time 711.

FIG. 9 is a flowchart 900 illustrating a method for operating a slaveelectronic device based on the DS-TWR scheme, according to anembodiment.

FIG. 9 describes a method wherein the electronic device 101 operates asa slave electronic device. It may be assumed that when the electronicdevice 101 operates as a slave electronic device, the first externalelectronic device 102 operates as a master electronic device.

Referring to FIG. 9, in step 901, the processor 120 of the electronicdevice 101 responds to a distance measurement request by using UWBcommunication. For example, the processor 120 may receive a message (ordata) for identifying whether or not to participate in distancemeasurement from the first external electronic device 102, and maytransmit a response message in response to the message, therebyresponding to the distance measurement participation. Additionallyalternatively, the processor 120 may receive a request for measuring thedistance from other external electronic devices from the user through aninput device 150. Alternatively, the processor 120 may receive adistance measurement request from the first external electronic device102 or the server 108 if an application (for example, game application)that uses the distance from external electronic devices is executed.Step 901 may be identical or similar to step 601 in FIG. 6.

In step 903, the processor 120 receives time schedule information fromthe first external electronic device 102. The time schedule informationmay include a time at which the electronic device 101 transmitsinformation (or message) to the external electronic devices, or a timeat which the electronic device 101 receives information from theexternal electronic devices. The processor 120 may receive time scheduleinformation determined by the first external electronic device 102 orthe server 108, and may store the time schedule information in thememory 130.

In step 905, the processor 120 receives first information (for example,P12/P13 in FIG. 7A) from the first external electronic device 102 at afirst time (for example, SLOT 1 701 in FIG. 7A). The first informationmay include the identifier of the first external electronic device 102or information regarding the time at which the first external electronicdevice 102 transmitted the first information. The first information mayalso be transmitted to second external electronic device 104. Theprocessor 120 may read information only corresponding to the electronicdevice 101 (for example, P12), among the received first information, andmay store the read information in the memory 130. The processor 120 maystore information regarding the time at which the first information wasreceived in the memory 130, or may read time information included in thefirst information and may store the read information in the memory 130.

In step 907, the processor 120 transmits second information (forexample, (R21,P21)/P23 in FIG. 7A) at a second time (for example, SLOT 2703 in FIG. 7A). The second information may include informationregarding the time at which the electronic device 101 received the firstinformation, or information regarding the time at which the electronicdevice 101 transmitted the second information. The processor 120 maystore information regarding the time at which the second information wastransmitted in the memory 130.

In step 909, the processor 120 receives third information (for example,(R31,P31)/(R32,P32) in FIG. 7A) from the second external electronicdevice 104 at a third time (for example, SLOT 3 705 in FIG. 7A). Theprocessor 120 may read information only corresponding to the electronicdevice 101 (for example, (R31,P31)) among the received thirdinformation, and may store the read information in the memory 130. Theprocessor 120 may store information regarding the time at which thethird information was received in the memory 130, or may read timeinformation included in the third information and may store the readinformation in the memory 130. For example, the third information mayinclude at least one of information regarding the time at which thesecond external electronic device 104 received the first information,information regarding the time at which the second external electronicdevice 104 received the second information, or information regarding thetime at which the second external electronic device 104 transmitted thethird information.

In step 911, the processor 120 receives fourth information (for example,(F12,R12)/(F13,R13) in FIG. 7A) from the first external electronicdevice 102 at a fourth time (for example, SLOT 4 705 in FIG. 7A) anddetermines the distance from the first external electronic device 102.The fourth information may include at least one of information regardingthe time at which the first external electronic device 102 received thesecond information, information regarding the time at which firstexternal electronic device 102 received the second information, orinformation regarding the time at which first external electronic device102 transmitted the fourth information. The processor 120 may readinformation only corresponding to the electronic device 101 (forexample, (F12,R12)) among the received fourth information, may store theread information in the memory 130, and may store information regardingthe time at which the fourth information was received.

The processor 120 may measure the distance from the first externalelectronic device 102 based on at least one of the first informationreceived at the first time 701, the second information transmitted atthe second time 703, or the fourth information received at the fourthtime 707. For example, the processor 120 may obtain processing timeinformation based on the fourth information, and may measure thedistance from the first external electronic device 102 based on at leastone of the obtained processing time information, information regardingthe time at which the first information was received, informationregarding the time at which the second information was transmitted, orinformation regarding the time at which the fourth information wasreceived.

At the fourth time 407, the second external electronic device 104 mayread information only corresponding to the second external electronicdevice 104 (for example, (F13,R13)) among the received fourthinformation, may store the read information in the memory 130, and maystore information regarding the time at which the fourth information wasreceived. The second external electronic device 104 may measure thedistance from the first external electronic device 102 based on at leastone of the first information received at the first time 701, the thirdinformation transmitted at the third time 705, or the fourth informationreceived at the fourth time 707.

In step 913, the processor 120 transmits fifth information (for example,F21/(F23,R23) in FIG. 7A) at a fifth time (for example, SLOT 5 709 inFIG. 7A). The fifth information may include at least one of informationregarding the time at which the electronic device 101 received the thirdinformation, information regarding the time at which the electronicdevice 101 received the fourth information, or information regarding thetime at which the electronic device 101 transmitted the fifthinformation.

At the fifth time 709, the first external electronic device 102 mayreceive fifth information (for example, F21/(F23,R23)) from theelectronic device 101, may read information only corresponding to thefirst external electronic device 102 (for example, F21), among thereceived fifth information, and may store the read information in thememory 130. The first external electronic device 102 may measure thedistance from the electronic device 101 based on at least one of thesecond information received at the second time 703, the fourthinformation transmitted at the fourth time 707, or the fifth informationreceived at the fifth time 709. At the fifth time 709, the secondexternal electronic device 104 may receive fifth information (forexample, F21/(F23,R23)) from the electronic device 101, may readinformation only corresponding to the second external electronic device104 (for example, (F23,R23)) among the received fifth information, andmay store the read information in the memory 130. The second externalelectronic device 104 may measure the distance from the electronicdevice 101 based on at least one of the second information received atthe second time 703, the third information transmitted at the third time705, or the fifth information received at the fifth time 709.

In step 915, the processor 120 receives sixth information (for example,F31/F32 in FIG. 7A) from the second external electronic device 104 at asixth time (for example, SLOT 6 711 in FIG. 7A), and determines thedistance from the second external electronic device 104. The sixthinformation may include at least one of information regarding the timeat which the second external electronic device 104 received the fourthinformation, information regarding the time at which the second externalelectronic device 104 received the fifth information, or informationregarding the time at which the second external electronic device 104transmitted the sixth information. The processor 120 may receive sixthinformation (for example, F31/F32) from the second external electronicdevice 104, may read information only corresponds to the electronicdevice 101 (for example, F32) among the received sixth information, andmay store the read information in the memory 130. The processor 120 maymeasure the distance from the second external electronic device 104based on at least one of the third information received at the thirdtime 705, the fifth information transmitted at the fifth time 709, orthe sixth information received at the sixth time 711.

At the sixth time 711, the first external electronic device 102 mayreceive sixth information (for example, F31/F32) from the secondexternal electronic device 104, may read information only correspondingto the first external electronic device 102 (for example, F31) among thereceived sixth information, and may store the read information in thememory 130. The first external electronic device 102 may measure thedistance from the second external electronic device 104 based on atleast one of the third information received at the third time 705, thefourth information transmitted at the fourth time 707, or the sixthinformation received at the sixth time 711.

FIG. 10 is a flowchart 1000 illustrating a method for operating anelectronic device based on the location of multiple electronic devices,according to an embodiment.

FIG. 10 describes a method wherein the electronic device 101 operates asa master electronic device.

Referring to FIG. 10, in step 1001, the processor 120 of the electronicdevice 101 executes an application. The processor 120 may receive anapplication execution request from the user through an input device 150.For example, the user may select an icon, which is to be executed, fromapplication icons displayed on the home screen of the electronic device101, or may select an application from a list of recently executedapplications. The application may be an application (for example, gameapplication) operating while being positioned at the location ofmultiple electronic devices.

In step 1003, the processor 120 configures a group (or team) based on auser input. The group configuration may be an operation of selectingusers (for example, external electronic devices) to play the gametogether inside the game application. The user may produce a groupinside the game application and may select other users to play the gametogether inside the produced group. Step 1003 may be identical orsimilar to step 503 in FIG. 5.

In step 1005, the processor 120 determines time schedule information.The processor 120 may identify the number of users included in the groupconfigured in step 1003, and may determine the time schedule informationbased on the location measurement scheme or the number of identifiedusers. The processor 120 may transmit the determine time scheduleinformation to external electronic devices.

In step 1007, the processor 120 may perform a location measurementprocess. The location measurement process may include an operation ofmeasuring the location of multiple electronic devices based on alocation measurement scheme (for example, a SS-TWR scheme or a DS-TWRscheme). For example, the processor 120 may perform steps 509 to 515 inFIG. 5 according to the SS-TWR scheme, thereby performing the locationmeasurement scheme. Additionally or alternatively, the processor 120 mayperform steps 809 to 819 in FIG. 8 according to the DS-TWR scheme,thereby performing the location measurement scheme.

In step 1009, the processor 120 determines whether or not an externalelectronic device is positioned at an effective distance. If theexternal electronic device is positioned at the effective distance, theprocessor 120 performs step 1011; and if the external electronic deviceis not positioned at the effective distance, the processor 120 returnsto step 1007.

In step 1011, the processor 120 controls the executed application basedon a user input. For example, the processor 120 may distinguish anexternal electronic device positioned at the effective distance from anexternal electronic device not positioned at the effective distance, andmay display the different positions of the external electronic devices.The processor 120 may shoot (e.g., measure) the external electronicdevice positioned at the effective distance based on the user's input(for example, shooting input). With regards to steps 1009 and 1011,different steps may be performed depending on the application to whichthe location measurement process is applied. The processor 120 maycontrol the application based on the measured location of the externalelectronic devices.

A game application (for example, virtual reality (VR)) type first personshooting (FPS) game may be configured with two separate teams in steps1001 and 1003. Respective teams may start the game at differentlocations, and respective teams may attack each other once the game isstarted in steps 1005 to 1011. Participants of respective teams may bedetermined in advance (for example, in the case of 5:5 team battle, atotal of ten participants), and all participants may have time intervalsassigned thereto in step 1005.

When respective teams start the game at different locations, users ofrespective teams may initially fail to recognize the locations ofopponents (for example, external electronic devices) because thedistance between them is impossible to measure (for example, thedistance is too large to be measured by a given type of communicationmeans). If an opponent comes within a measurable distance (or within ashooting range of a specific weapon), the electronic device 101 mayrecognize the opponent (for example, an external electronic device at adistance that can be specified) and display the recognized opponentthrough a display 190, or may provide an indication that shooting ispossible. The electronic device 101 may transmit shooting information tothe server 108 at an assigned time, or may use another time interval todeliver shooting information.

The location measurement process may be applied to self-driving carssuch that each car can quickly identify the location of a counterpartcar. Thus, autonomous driving may be possible because each car canquickly identify the location of a counterpart car, thereby quicklydetermining the location of the counterpart car.

The location measurement process may be applied to drones such that eachdrone can quickly identify where another drone is positioned duringflight, thereby preventing a collision.

A method for operating an electronic device 101 may include theoperations of identifying multiple external electronic devices by usingat least one communication module 190 included in the electronic device;determining time schedule information based on a number of the multipleidentified external electronic devices or based on a locationmeasurement scheme; transmitting time schedule information to themultiple external electronic devices; transmitting first information tothe multiple external electronic devices at a first time, based on thetime schedule information, by using the at least one communicationmodule; receiving second information from one of the multiple externalelectronic devices at a second time assigned to the multiple externalelectronic devices, by using the at least one communication module; anddetermining a distance of one of the multiple external electronicdevices based on the first information or the second information.

The second information may include information regarding a time at whichthe first external electronic device received the first informationafter transmitting the second information or information regarding atime at which the first external electronic device transmitted thesecond information. The operation of determining a distance of one ofthe multiple external electronic devices may include the operations ofobtaining information regarding a processing time of the first externalelectronic device based on the second information when the locationmeasurement scheme is an SS-TWR scheme; and determining a distance fromthe first external electronic device based on at least one of theobtained information regarding a processing time, information regardinga time at which the first information was transmitted, or informationregarding a time at which the second information was received.

The operation of determining the distance of one of the multipleexternal electronic devices may include the operations of receivingthird information from a different one of the multiple externalelectronic devices at a third time when the location measurement schemeis a DS-TWR scheme; transmitting fourth information to the multipleexternal electronic devices at a fourth time assigned to the electronicdevice; receiving fifth information from one of the multiple externalelectronic devices at a fifth time; and determining the distance fromone of the multiple external electronic devices based on at least one ofthe second information, the fourth information, or the fifthinformation.

When the locations of multiple electronic devices are measured throughUWB communication, the time at which each electronic device transmitsinformation for location measurement may be scheduled, and informationmay be transmitted at the scheduled time, thereby making it possible toquickly acquire the location of multiple electronic devices.

While the present disclosure has been particularly shown and describedwith reference to certain embodiments thereof, it will be understood bythose of ordinary skill in the art that various changes in form anddetails may be made therein without departing from the spirit and scopeof the disclosure as defined by the appended claims and theirequivalents.

What is claimed is:
 1. An electronic device comprising: at least onecommunication module; a memory; and a processor operably connected tothe at least one communication module and the memory, wherein theprocessor is configured to: identify multiple external electronicdevices by using the at least one communication module; determine timeschedule information based on a number of the multiple identifiedexternal electronic devices or based on a location measurement scheme;transmit the time schedule information to the multiple externalelectronic devices by using the at least one communication module;transmit first information to the multiple external electronic devicesat a first time assigned to the electronic device, based on the timeschedule information, by using the at least one communication module;receive second information from one of the multiple external electronicdevices at a second time assigned to the multiple external electronicdevices, by using the at least one communication module; and determine adistance from one of the multiple external electronic devices based onthe first information or the second information, wherein the timeschedule information instructs each of the multiple external electronicdevices to transmit information at a given time such that each of themultiple external electronic devices transmit information at an assignedtime, and wherein each of the multiple external electronic devicesidentify which electronic device transmitted the information at theassigned time, based on the time schedule information.
 2. The electronicdevice of claim 1, wherein the at least one communication modulecomprises an ultra-wide band (UWB) communication module or acommunication module different from the UWB communication module.
 3. Theelectronic device of claim 1, wherein the processor is furtherconfigured to: transmit a message for identifying whether or not toparticipate in distance measurement, by using the at least onecommunication module; receive a response message in response to thetransmitted message; and determine the number of the multiple identifiedexternal electronic devices based on the received response message. 4.The electronic device of claim 1, wherein the location measurementscheme comprises at least one of a single side two way ranging (SS-TWR)scheme or a double side two way ranging (DS-TWR) scheme.
 5. Theelectronic device of claim 1, wherein the location measurement schemecomprises a single side two way ranging (SS-TWR) scheme, and wherein theprocessor is further configured, by using the at least one communicationmodule, to: receive the second information from a first externalelectronic device included in the multiple external electronic deviceswhich received the first information at the second time; and determine adistance from the first external electronic device based on the firstinformation or the second information.
 6. The electronic device of claim5, wherein the second information comprises information regarding a timeat which the first external electronic device received the firstinformation or information regarding a time at which the first externalelectronic device transmitted the second information, and wherein theprocessor is further configured to: obtain information regarding aprocessing time of the first external electronic device based on thesecond information; and determine the distance from the first externalelectronic device based on at least one of the obtained informationregarding the processing time, information regarding a time at which thefirst information was transmitted, or information regarding a time atwhich the second information was received.
 7. The electronic device ofclaim 5, wherein the second information comprises information regardinga processing time of the first external electronic device, and whereinthe processor is further configured to determine the distance from thefirst external electronic device based on at least one of informationregarding a time at which the first information was transmitted,information regarding a time at which the second information wasreceived, or the information regarding the processing time of the firstexternal electronic device included in the second information.
 8. Theelectronic device of claim 5, wherein the processor is furtherconfigured to: receive third information from a second externalelectronic device included in the multiple external electronic deviceswhich received the first information at a third time, by using the atleast one communication module; and determine a distance from the secondexternal electronic device based on the first information or the thirdinformation.
 9. The electronic device of claim 8, wherein the thirdinformation comprises at least one of information regarding a time atwhich the second external electronic device received the firstinformation, information regarding a time at which the second externalelectronic device received the second information, or informationregarding a time at which the second external electronic devicetransmitted the third information, and wherein the processor is furtherconfigured to: obtain information regarding a processing time of thesecond external electronic device based on the third information; anddetermine the distance from the second external electronic device basedon the obtained information regarding the processing time, informationregarding a time at which the first information was transmitted, orinformation regarding a time at which the third information wasreceived.
 10. The electronic device of claim 9, wherein the processor isfurther configured to: receive sixth information from the secondexternal electronic device at a sixth time; and determine the distancefrom the second external electronic device based on at least one of thethird information, the fourth information, or the sixth information. 11.The electronic device of claim 1, wherein the location measurementscheme comprises a double side two way ranging (DS-TWR) scheme, andwherein the processor is further configured, by using the at least onecommunication module, to: receive the second information from a firstexternal electronic device included in the multiple external electronicdevices at the second time; receive third information from a secondexternal electronic device included in the multiple external electronicdevices at a third time; transmit fourth information to the firstexternal electronic device and to the second external electronic deviceat a fourth time; receive fifth information from the first externalelectronic device at a fifth time; and determine a distance from thefirst external electronic device based on at least one of the secondinformation, the fourth information, or the fifth information.
 12. Theelectronic device of claim 11, wherein the fifth information comprisesat least one of information regarding a time at which the first externalelectronic device transmitted the second information, informationregarding a time at which the first external electronic device receivedthe fourth information, or information regarding a time at which thefirst external electronic device transmitted the fifth information, andwherein the processor is further configured to: obtain informationregarding a processing time of the first external electronic devicebased on the fifth information; and determine the distance from thefirst external electronic device based on at least one of the obtainedinformation regarding the processing time, information regarding a timeat which the second information was received, information regarding atime at which the fourth information was transmitted, or informationregarding a time at which the fifth information was received.
 13. Anelectronic device comprising: at least one communication module; amemory; and a processor operably connected to the at least onecommunication module and the memory, wherein the processor is configuredto: respond to a location measurement request from a first externalelectronic device by using the at least one communication module;receive time schedule information from the first external electronicdevice by using the at least one communication module; receive firstinformation from the first external electronic device at a first timeassigned to the first external electronic device, based on the timeschedule information, by using the at least one communication module;transmit second information to the first external electronic device andto a second external electronic device at a second time assigned to theelectronic device by using the at least one communication module;receive third information from the second external electronic device ata third time by using the at least one communication module; determine adistance from the second external electronic device based on the secondinformation or the third information; and receive fourth informationfrom the first external electronic device at a fourth time, wherein theprocessor is further configured to: when a single side two way ranging(SS-TWR) scheme is used as a location measurement scheme, obtaininformation regarding a processing time of the first external electronicdevice based on the fourth information; and determine a distance fromthe first external electronic device based on at least one of theobtained information regarding the processing time, informationregarding the second time at which the second information wastransmitted, or information regarding the fourth time at which thefourth information was received, or when a double side two way ranging(DS-TWR) scheme is used as a location measurement scheme, determine thedistance from the first external electronic device based on at least oneof the first information, the second information, or the fourthinformation.
 14. The electronic device of claim 13, wherein the thirdinformation comprises at least one of information regarding a time atwhich the second external electronic device received the firstinformation, information regarding a time at which the second externalelectronic device received the second information, or informationregarding a time at which the second external electronic devicetransmitted the third information, and wherein the processor is furtherconfigured to: obtain information regarding a processing time of thesecond external electronic device based on the third information when asingle side two way ranging (SS-TWR) scheme is used as a locationmeasurement scheme; and determine the distance from the second externalelectronic device based on the obtained information regarding theprocessing time, information regarding a time at which the secondinformation was transmitted, or information regarding a time at whichthe third information was received.
 15. The electronic device of claim13, wherein the processor is further configured, by using the at leastone communication module, to: transmit fifth information to the firstexternal electronic device and to the second external electronic deviceat a fifth time; receive sixth information from the second externalelectronic device at a sixth time; and determine the distance from thesecond external electronic device based on at least one of the thirdinformation, the fifth information, or the sixth information.
 16. Amethod for operating an electronic device, the method comprising:identifying multiple external electronic devices by using at least onecommunication module included in the electronic device; determining timeschedule information based on a number of the multiple identifiedexternal electronic devices or based on a location measurement scheme;transmitting the time schedule information to the multiple externalelectronic devices by using the at least one communication module;transmitting first information to the multiple external electronicdevices at a first time assigned to the electronic device, based on thetime schedule information, by using the at least one communicationmodule; receiving second information from one of the multiple externalelectronic devices at a second time assigned to the multiple externalelectronic devices, by using the at least one communication module; anddetermining a distance from one of the multiple external electronicdevices based on the first information or the second information,wherein the time schedule information instructs each of the multipleexternal electronic devices to transmit information at a given time suchthat each of the multiple external electronic devices transmitinformation at an assigned time, and wherein each of the multipleexternal electronic devices identify which electronic device transmittedthe information at the assigned time, based on the time scheduleinformation.
 17. The method of claim 16, wherein the second informationcomprises information regarding a time at which a first externalelectronic device included in the multiple external electronic devicesreceived the first information after transmitting the second informationor information regarding a time at which the first external electronicdevice transmitted the second information, and wherein determining thedistance from one of the multiple external electronic devices comprises:obtaining information regarding a processing time of the first externalelectronic device based on the second information when the locationmeasurement scheme is a single side two way ranging (SS-TWR) scheme; anddetermining a distance from the first external electronic device basedon at least one of the obtained information regarding the processingtime, information regarding a time at which the first information wastransmitted, or information regarding a time at which the secondinformation was received.
 18. The method of claim 16, whereindetermining the distance from one of the multiple external electronicdevices comprises: receiving third information from a second one of themultiple external electronic devices at a third time when the locationmeasurement scheme is a double side two way ranging (DS-TWR) scheme;transmitting fourth information to the multiple external electronicdevices at a fourth time assigned to the electronic device; receivingfifth information from one of the multiple external electronic devicesat a fifth time; and determining the distance from one of the multipleexternal electronic devices based on at least one of the secondinformation, the fourth information, or the fifth information.